Connect 4 – Week 5 (19.09 – 25.09)


Algorithm:
During our research about the algorithms, we found a few good sources. This week we started to have a more detailed look at the algorithms from the sources and started to try to understand them. But more time is necessary to fully know and implement these algorithms. One of the most important algorithm we have had a look at was the Alpha-Beta-Cut. It’s combined with a Min-Max-Algorithm also.

Software-prototype:
We also started with a software-prototype of the game to implement and test the algorithms. But first the basics needed to be programmed. We used python for that, because it’s the easiest programming language also on the Rasperry Pi. There are multiple librariers for controlling the motor, the gpio pins for the photoresistors and for the LED stripe. In the first prototype, you can already play and it shows the gameboard. The computer is playing after you, but only plays really random (with a random.randint(0, 6) ). Checks for wrong input of player and full column is implented. But a major flaw is that it doesn’t check if somebody wins. So you can always play till the board is full. We need to implement this next week, where we also want to start implementing the algorithmus (if we understand it enough ^^ )

Mechanical parts:
This week we also did some more prototyping on the gameboard to make it less “cheatable”. The top part of the gameboard is almost ready as a final disign and on that part there is less to improve, the coming weeks we will test and prototype some other parts of the board. The biggest thing is the stands for the coin dropping mechanism.

Material/Part list:
We chose some components which have to be bought and because of delivery time we have to make a dicision as soon as possible.

Mechanical components:

– (1x) Tr8x8 Spindel
Length: minimum 350mm
6mm or higher pitch/lead is preferrable (axial movement per rotation)
Example: https://www.ebay.com/itm/2848710750322

– (5x) bearings 10mm inner bore
Inner bore must bet the same as (small) brass nut diameter
Outer bore not important
Example: https://www.ebay.com/itm/275323495950

– (3x) Tr8x8 Right Hand Flange Trapezoidal Brass Nut
Same size as spindel
Example: https://www.ebay.com/itm/124260787704

– (1x) Nema 17 stepper motor (10+ volts)
1.500+ RPM possible,
No high torque required
Amount of steps not important
Preferably with geared axle
Dimensions preferably smaller than 80x80x70mm
Example: https://www.ebay.com/itm/273849432642

Electrical components:

– (1x) Raspberry pi 3 or 4 if possible
Example: https://www.ebay.com/itm/385015872432

– (1x) MT3608 step up Module
Example: https://www.ebay.com/itm/175303774032

– (1x) 12v – 5v step down Module
Example: https://www.ebay.com/itm/201847763020

– (2x, in case we fry one) L298N H-Bridge driver module
Example: https://www.ebay.com/itm/362863436137

– (1x) A4988 driver
Example: https://www.ebay.com/itm/224666575923

– (1x) 100uF Decoupling Capacitor-> minimum 47uF
Example: https://www.ebay.com/itm/233828463671

– (4x) 74HCT125 quad buffer/line driver
74HCT125
Example: https://www.ebay.de/itm/74HCT125-Leitungstreiber-4-fach-tristate-DIP14-/310656186067

– (1x) LED Strip WS2812B 5050
Ip60 non waterproof
White PCB
3m 180leds (60 leds per meter)
Example: https://www.ebay.com/itm/275109949599

, ,

Leave a Reply