4-Bot - A Raspberry Pi Connect 4 Robot

Here's a Raspberry Pi Powered robot that plays a pretty mean game of Connect 4.

Similar projects worth following
  • Description
  • Details
  • Files 0
  • Components 0
  • Logs 0
  • Instructions 0
  • Discussion 0
4-Bot uses the Python Imaging library to process the image of the game board. The image is down-sampled to 16 colours to enhance readability and then divided into a grid. Each of the 42 spaces on the board is identified as red, yellow or empty by reading the RGB value of each space in the grid and this data is then saved as an array which represents the board state and then passed to the AI. Even on a small 6 x 7 Connect 4 board there are 4,531,985,219,092 possible game positions – yes, that’s TRILLIONS! So getting the Pi to play the game effectively was quite a challenge. It becomes a trade off between absolute perfect play, and reasonable time for each move. The robot part is built from a recycled top assembly from a 3D printer and the claw from a MeArm robot arm. Motion and LCD screen controlled by the PiXi controller board.

See it in action here:

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates