<aside> 🦠 Cellular automata with competitive AIs.
This project was completed for my Honors Advanced Computer Science, Data Structures & Algorithms class. The objective was to create a competitive AI that would eliminate other AIs from the "society". I took inspiration from organic bacteria behaviors and bactericidal agents to create an algorithm, cleverly titled
BactericAIdal (pronounced "bacteris-A-I-dal"), that is very effective at eliminating other players.
🧑💻 Interested in seeing the code for this project? It is available on my GitHub at https://github.com/chroline/cellWars. The code powering
BactericAIdal is located at
These are the instructions given for the assignment.
Here's how the game works:
Each player will get to design their own AI which must be a subclass of
CellAI. The progression of the game is follows:
The game is played on a square grid made of int values. Numbers that are 0 or larger in the grid represent player cells, while the value -1 indicates a dead cell. Each
CellAI is given a unique id number. In a 4 player game, there will be 5 different values in the grid: -1, 0, 1, 2, and 3
At the beginning, each player has their id number placed in random spots in the grid.
The number of cells in the grid depends on the number of players - you can find information about this in the populateGrid method of the Simulation class.
The first player loaded into the game selects a location in the grid to either
a. kill a cell that is alive (A player can kill their own cell or an opponent's cell)
b. spawn an offspring if the selected cell is dead