Inspiration
Our project was inspired by the age old, famously known prisoner's dilemma. A fairly simple problem to understand, yet a difficult one to come up with a solution to. Individuals can either defect or cooperate, however they must come to a decision based on what they believe the other prisoner will do. If two individuals defect, then they each get 10 years in prison. If only one defects, and another cooperates, the one who defects gets 1 year, and the one who cooperates gets 5 years. If both decide to cooperate, they both get 3 years. It's truly a battle of wits, luck, and strategy. We decided to do a hardware implementation fo the game in a form of points.
What it does
Our project has two interface boards with three buttons each. The first button allows a player to defect. The second button allows a player to cooperate. The third button allows players to speed up the round time. Once both players agree to speed up round time, or the timer hits zero, the points are calculated and the results are revealed. The game can be played with player versus player or player versus bot. The bots have various algorithms on them that make different decisions based on previous player output/ For example, one algorithm may solely cooperate, but once it sees that its opponent has defected once, it only defects from then on. We have various messages on LCD screens for an easier to use interface
How we built it
We build the hardware portion of it using Arduino to connect our hardware inputs. We used digital design to develop our interface which allows the user to seemlessly navigate and understand that their inputs have been processed. The bot is built using C++ Arduino code that implements the main logic.
Challenges we ran into
One of the major challenges we ran into was power consumption. Initially our interface had much more circuitry and wiring, but this ate up our power sources, as well as required a high constant voltage. We had to reduce the amount of circuitry involved within the project to be able to develop a feasible project. It took a lot of effort to build some portions of the circuit, but they had to be removed just due to the immense power consumption. We also did not have enough time to implement the algorithm with the hardware, thus parts of firmware is incomplete.
Accomplishments that we're proud of
We are proud of being able to develop a cohesive project as a group which uses all the fundamentals we learned in school. This being logic design, circuit design and analysis, as well as coding. We are also proud of developing good code which incorporates the principles of object oriented design, as well as created a good player interface with the circuitry despite the major setbacks we faced along the way.
What we learned
We definitely learned a lot from this project. We learned a lot about the design process of embedded systems which incorporate both hardware and software portions, as well as how to divide work between teams and seemlessly integrate work between them.
What's next for Programmer's Dilemma
For the prisoner's dilemma, we hope to be able to find a way to implement all the cirucitry we had in the initial prototyping, but with much less power consumption. Furthermore, add more algorithms, as well as store statistics from previous games.
Log in or sign up for Devpost to join the conversation.