Design

GAME DESIGN

Artificial Intelligence and Machine Learning

To allow players to play against an AI, we used reinforcement learning to code the AIs. Numerous powerful reinforcement learning algorithms are being used to train industry-level, cutting-edge artificial intelligence systems. For our project, the types of games that we are trying to solve are zero-sum adversarial search problems. Zero-sum means that one player must win and the other must lose, and each of these games (Tic-Tac-Toe, Connect Four, Battleship, and Snake) can be represented as a game tree of actions and states.

To code our AIs, we used the minimax algorithm, which assumes that the opponent always behaves optimally and minimizes its opponent's rewards while optimizing its own. Hence, the game tree can be represented as a tree filled with alternating layers representing the agent (maximizer) and its opponent (minimizer).

Tic-Tac-Toe

Tic-Tac-Toe is a zero-sum adversarial deterministic solved game, as the sample space and possible combinations of actions that an agent and its opponent can take is only 39. Since the total number of possible game states is relatively low, minimax isn’t computationally expensive and would execute relatively quickly, so we used minimax to code an AI that always performs optimally and never loses.

Connect Four

The game state tree for Connect Four is significantly larger than for Tic-Tac-Toe, as there are numerous more possible game states (more than 4.5 trillion). We can represent all the possible states using a game tree, as partially shown here, and we used minimax to create an AI as well.

Battleship

The state-space tree for battleship is even larger than the game tree for Connect Four. The algorithm we will use to solve Battleship will be the same as the one used for Connect Four: minimax.

MECHANICAL DESIGN

1 / 4
2 / 4
3 / 4
4 / 4

A key apparatus that the mechanical engineering team implemented into the design process was the scissor-lift mechanism. By being able to raise the base by a substantial amount, repairs to the internal components can be executed without obstruction. The mechanism is executed by manually lifting up the upper base and is hoisted opened using two wooden place holders on each side of the scissor lifts. Aside from the mechanism, the two faces of the grid are connected using a snap fitting design. The grid is 3D printed while the base is made out of wood to ensure structural stability. The overall housing was designed to be strong and repair-friendly while maintaining a low production cost with a reasonable manufacturing timeline.

ELECTRICAL DESIGN

1 / 4
Tic-Tac-Toe
2 / 4
Battleship
3 / 4
Connect Four
4 / 4
Snake

For the electrical design, we utilized an Arduino Uno to control the LEDs and button inputs. The LEDs were controlled using a programmable RGB LED strip powered by 2 amps of current. For the buttons, we used the PWM I/O pins on the Arduino to detect button presses. When pressed, each button has a separate functionality depending on the code mapped to that button. In order to choose games, we set up a small 5 inch Raspberry Pi mounted screen to choose and communicate which games to play to the Arduino.