Posts with «connect four» label

Electronic Connect Four Has No Pieces to Lose

Recreating classic games in software is a great way to get better at coding or learn to code in the first place. If you do it in hardware though, you’ll gain a lot more than coding skills. Just ask [Kelly] and [Jack] did, when they built this Arduino-based electronic Connect Four for a school project.

We love that their interpretation manages to simplify game play and make it more fun than the original version. All the players have to do is turn it on and start pushing the arcade buttons along the bottom to choose the column where they want to make a play. The LEDs animate from top to bottom to imitate the plastic disc dropping down through the board. If a win is detected — four in a row of the same color going any direction — the board fills up with the winning color and the game starts over.

The state machine doesn’t currently do anything about tie situations, so there’s a reset button hidden on the side. As [Kelly] and [Jack] explain in their walk-through video after the break, that is something they would like to address in the future, along with making it possible to choose whatever battle color you want. We think a reset animation that mimics the look of the discs spilling out the bottom would be cool, too.

If you’ve never implemented a game on hardware before, something like this might be a bit daunting. May we suggest a game of 4×4 Tic Tac Toe instead?

Giant Connect Four Pits You Against the Computer

You can build a Connect Four solver in software, but it won’t be all that much fun. Now apply that same automation to a 15-foot-tall plywood version of the classic board game and you’ve just created a smile-making-machine for everyone within eyesight. Behold the Mono-Purpose Automated Robot Versed In Connnect4 (Marvin) which Ben and Jonathan dreamed up on their way home from Maker Faire last year, and made into their exhibit this year.

On the physical side of things they got really creative in lifting the discs and sorting them into the column chosen by the software brain of the game. A chain travels along one side with fingers every few feet. The fingers travel along the channel, lifting the discs. Those fingers are a couple of bolts, with some metal filler, all epoxied into one solid unit.

At the top of the disc elevator, and at the top position of each column in the gaming board, there are IR reflectance sensors which send feedback to the Arduino that drives the hardware. This proved a major issue during setup the day before the Faire. The reflectance sensors are just blasting out IR and not using a carrier signal. In direct sunlight, the detector was in a constant state of being tripped. After some trial and error, the logic for the sensors was flipped to detect the absence of sunlight by placing black plastic behind that top row of the board and putting duct tape over the IR emittors.

There’s a router and laptop rolled into the system. The Arduino makes an HTTP request to software on the laptop. In addition to determining where the next move should be made, the laptop is connected to a large screen which shows the current state of the gaming board. This is a head-to-head, human versus machine game. The human player drops their discs from the top of the board using a paint roller that hooks into a hole at the center of the disc. This way the player’s disc passes by the sensors, triggering the machine’s next move.

It’s a clever build and due to the sheer size it’s pretty awesome they were able to get it to the Faire from Philadelphia. Don’t miss the video after the break that shows off the fun and excitement of this gaming giant.