Schlagwort: Tic-Tac-Toe Game

  • This shield brings a tic-tac-toe game to your Arduino Mega, complete with an AI opponent

    This shield brings a tic-tac-toe game to your Arduino Mega, complete with an AI opponent

    Reading Time: 2 minutes

    Arduino TeamJune 22nd, 2021

    Tic-tac-toe is a nearly perfect time-wasting game as it’s quick to play, easy to learn, and has a very small set of rules, which makes it ideal for implementation on a microcontroller. Michael Klements wanted to take it a step further and add a simple AI that can effectively play against a human opponent while never losing a single match. The device he came up with is a shield that fits onto an Arduino Mega and features a grid of LEDs and corresponding tactile buttons. A player can then choose from one of three different modes: easy AI, expert AI, or a human opponent. 

    If an AI mode is chosen and it goes first, the first spot on the board where a piece goes is the corner, which eliminates several orders of magnitude of choices, thus speeding up the time it takes to run through the recursive minimax algorithm. The easy mode will perform a couple of random moves in the beginning to give the player a chance to win. 

    You can read more about how Michael created this AI tic-tac-toe device in his well-written blog post here and see it in action below.

    [youtube https://www.youtube.com/watch?v=jzYa94ZsFe4?feature=oembed&w=500&h=281]

    Website: LINK

  • This sensor-based tic-tac-toe game looks like some touchless fun!

    This sensor-based tic-tac-toe game looks like some touchless fun!

    Reading Time: 2 minutes

    This sensor-based tic-tac-toe game looks like some touchless fun!

    Arduino TeamJanuary 6th, 2021

    Tic-tac-toe is normally played with a pen and paper, or perhaps with a physical marker, but maker “techiesms” has put a new spin on this classic pastime.

    His build, as seen here, takes the form of a wooden box that mounts onto the wall with nine square sections arranged in a grid pattern. Players take turns, activating a square by moving their hand near an IR proximity sensor inside each one. 

    The squares then light up green or red depending on the player, and when a line is made, the system beeps and blinks on and off to signify a winner. Everything is controlled via an Arduino Mega, along with a custom PCB for wiring.

    More details on the game and its construction can be found in techiesms’ post here.

    [youtube https://www.youtube.com/watch?v=HkF3P_8tI9k?feature=oembed&w=500&h=281]

    Website: LINK