XOTrix is tic-tac-toe on a 3×3 board inside a full web app, with a sidebar for modes, bot levels, stats, themes and settings. You can play a friend on the same device, take on a computer opponent, or watch two bots play each other. The rules are the classic ones: X moves first, players alternate, and the first to line up three marks wins.
Mouse, touch and keyboard
Click or tap any empty cell to place a mark, so XOTrix works on phones and tablets as well as computers. On a narrow screen the sidebar tucks itself away, and the ☰ button in the top-right corner brings it back. Keyboard players get shortcuts: the number keys 1–9 fill cells in reading order, from top-left to bottom-right. You can also tab to a cell, move between cells with the arrow keys, and press Enter or Space. U undoes the last move. Against the bot, one press takes back your move and its reply, so it is your turn again. R resets the board, and once a game is over it starts the next one. A timer above the board counts up from 00:00.
Modes and bot strength
Human vs Human is a two-player game on one screen. Human vs Bot and Bot vs Bot use a minimax search at one of four levels:
- Beginner plays a random empty cell half the time and a short look-ahead move otherwise.
- Intermediate looks five moves deep, counting its own.
- Advanced, the default, looks seven moves deep.
- Master searches to the end of the game and uses a small opening book.
The bot waits a moment before each move, longer at higher levels.
History, stats and themes
The History button lists the moves of the current game with a replay slider. The Stats panel shows win rate, games played, an Elo rating that starts at 1200, your current streak and your fastest win. Wins and losses only count in Human vs Bot games, but draws and two-player games still add to games played, and the Elo rating moves after any game that someone wins. Your stats, sound and volume settings, haptic feedback (vibration on phones that support it) and the chosen theme are saved in your browser's local storage. There are six themes: Neon, Glass, Retro, Minimal, Forest and Sunset.
Playing for the win
- When you go first, start in the center or a corner, since those cells sit on the most lines.
- If your opponent opens in the center, answer in a corner, not on an edge.
- Look for forks: a move that makes two lines of two at once cannot be blocked in a single turn.
- Practice forks against Beginner, which plays random cells half the time. Against Master, a draw is the best you can get.
For more quick strategy games, see our puzzle games. XOTrix was created by BHARANI KUMAR S and is released under the MIT License.
