Conclusions
The Connect 4 Bot was successful in playing against a human. Our system could take inputs from a human player via our controller box. The AI could make a valid move and our system could dispense the chips correctly.
Conclusions
The Connect 4 Bot was successful in playing against a human. Our system could take inputs from a human player via our controller box. The AI could make a valid move and our system could dispense the chips correctly.
Discussion
Throughout the project we ran into a few issues. We couldn't implement the hard difficulty on the Arduino MEGA. Therefore we decided to use the Arduino DUE which could handle the hard difficulty because it had a better processor. However using the Arduino DUE posed some issues as well. The DUE only accepts digital signals at 3.3V. Our 8:3 decoder IC and LEDs accept and send 5V signals therefore we needed to create a logic shift circuit. The logic shift ICs didn't make it in time for the Engineering Showcase so we used the Arduino MEGA which could only implement the easy and medium difficulty.
Another issue we ran in to was driving enough current into our LED circuit. Earlier in the project we tested our LED code by turning on one LED to verify our code was functionally correct. By the time we integrated all the servos and LEDs, we found our microcontroller wasn't functioning correctly. The Arduino could only supply a maximum current of 200 mA. Each LED requires 20 mA and the servos could draw around 200 - 300 mA. Therefore we had to power the servos with their own dedicated power supply and we had to create a BJT current amplifier circuit to power the LEDs.
When assembling the project for the Engineering Showcase we ran into wiring issues. The reason for this was we had to create the BJT current amplifier circuit which added more wiring. When we designed our controller box we didn't account for the additional BJT current amplifier circuit; therefore, there wasn't that much room to fit everything inside. The tight fit led to some wires becoming loose therefore some LEDs weren't turning on and one button wasn't working. After debugging our project and finding the problems were a result of faulty wiring we were able to fix them and have our project work as intended.
Overall what we learned was that during the design we ran into problem that we didn't know would be there. The reason for this is a lack of experience as engineers. We were able to solve the problems. In our future endeavors, we now will be aware of the issues we ran into while doing this project and account for them. We also learned how to take an idea from conception into a finished product.
Future Implementation
Since we couldn't implement the hard difficulty in time for the Engineering Showcase we would like to build the logic shift circuit and port our code with the minimax algorithm onto the Arduino DUE. We would like to fine tune the evaluation function in order to make a more robust AI. Implementing Minimax with Alpha-Beta pruning will speed up our AI. We would also like to implement more LEDs to tell the user what game state they are in, and dedicated LEDs to inform the player when they won, lost or drawn the game.
We would like to design a PCB for our project which would help reduce the number of wires needed. It would allow for a clean design of the circuits our project needed. The PCB would allow connecting the right signals to and from the microcontroller easier. We would also like to design a bigger controller box that would also make wiring easier. It would also allow for room to hold our PCB and microcontroller.
Finally we would like to implement Wi-Fi. That would enable two patients in different rooms to play each other. Being able to do that would fulfill the reason why we did this project.