Schlagwort: Connect Four

  • Automating Connect Four setup and cleanup

    Automating Connect Four setup and cleanup

    Reading Time: 2 minutes

    Good old-fashioned tabletop games are a lot of fun to play, but they’re a pain in the butt to set up. We all know the pain of divvying out Monopoly money and organizing tiny plastic houses. Connect Four players might spend as much time organizing pieces between games as they do actually playing. To facilitate Connect Four speed runs, Jared Dilley built this board that automatically sorts the pieces after a game.

    A normal Connect Four board just dumps all the pieces out of the bottom after a game, forcing players to classify them by color. Dilley’s updated board does all of that automatically. At the push of a button, it will begin ejecting pieces from the bottom. Little motorized flaps cause the falling pieces to drop one way or the other. The machine repeats that process for all the rows and each player ends up with a pile of the appropriate pieces on their side of the board, ready for a new game.

    An Arduino Mega 2560 detects whether a piece is red or black using an infrared sensor. Dilley adjusted the sensor so that it registers an infrared reflection for red pieces, but not black pieces. Each column has its own sensor, so the Arduino can recognize the colors of the entire bottom row. It then sets the positions of the flaps accordingly using servo motors controlled through a servo shield. Finally, another servo quickly releases the bottom row and then moves back to block the following row. That process repeats until all the pieces have been sorted.

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

    We can’t imagine that many people play enough Connect Four to make this worthwhile, but it is still a lot of fun to see in action and crosses into “oddly satisfying” territory.

    The post Automating Connect Four setup and cleanup appeared first on Arduino Blog.

    Website: LINK

  • Electronic game of Connect Four played on an 8×8 LED matrix

    Electronic game of Connect Four played on an 8×8 LED matrix

    Reading Time: 2 minutes

    The childhood classic tabletop game of Connect Four entails dropping either a red or yellow disc into one of several columns in a grid with the hope of lining up four in a row. And even though the game has existed digitally for a while now, it is mostly played on LCD screens with fancier graphics and AIs against which the player competes. Wanting to push this paradigm further, Mirko Pavleski built a mini tabletop arcade cabinet that uses an Arduino Nano and an LED matrix instead to run the game.

    In order to display the current grid to the player(s), Pavleski purchased an 8×8 WS2812B individually addressable LED matrix that gets powered by the Arduino Nano‘s 5V regulator. Because the game can either be played against another human or an AI opponent, the cabinet contains three buttons for selecting the chip’s drop location and a buzzer to deliver audible feedback when an event occurs. The entire device was constructed from a few 5mm PVC boards lined with colored paper for an old-fashioned aesthetic.

    Watching the microcontroller AI opponent play Connect Four in real-time is quite impressive, owing to the relatively small computing resources of the Arduino Nano’s ATmega328 MCU. To see it in action, you can watch Pavleski’s video below or check out his project write-up on Hackster.io.

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

    The post Electronic game of Connect Four played on an 8×8 LED matrix appeared first on Arduino Blog.

    Website: LINK

  • Playing Connect Four against a mini golfing AI opponent

    Playing Connect Four against a mini golfing AI opponent

    Reading Time: 2 minutes

    Arduino TeamApril 27th, 2021

    Have you dreamed of combining the two incredible activities putt-putt and Connect Four together into the same game? Well one daring maker set out to do just that. Bithead’s innovative design involves a mini golf surface with seven holes at the end corresponding to the columns. The system can keep track of where each golf ball is with an array of 42 color sensors that are each connected to one of seven I2C multiplexers, all leading to a single Arduino Uno

    The player can select from six distinct levels of AI, all the way from random shots in the dark to Q Learning, which records previous game-winning moves to improve how it plays over time. It can putt by first loading a golf ball into a chamber and then spinning up a pair of high-RPM motors that launch it. For the human player, there is a pair of dispensers on the left that give the correct color of ball. 

    The entire system runs on an Intel NUC that hosts the game which was written in C#. There’s a large 22″ touchscreen at the front that is mounted at eye-level for easy interactions. Although it took Bithead nearly 18 months and $3,500, the end result is spectacular.

    Be sure to check out his great write-up, which has a couple of demonstration videos and a build log. 

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

    Website: LINK