Project Title: Escape the Maze
This project involves the development of a competitive game where multiple AI agents, created by teams of students, navigate through programmatically generated mazes. The student teams are responsible for both developing the AI agents (clients) and setting up a server that connects these AI agents. Additionally, the server will load the programmatically generated maze maps and function as a viewer to display the progress of the game.
The goal is to determine the most efficient AI solution through direct competition among the AI agents, with the current positions of the players being highlighted on the screen. The player whose AI exits the maze first is declared the winner. The server will monitor win conditions and award points accordingly.
The maze must be generated according to the following constraints:
Each generated maze needs to be checked for validity to see if it respects the constraints imposed.
The maze generator must output an image, in 8bpp, grayscale format, with the following color representations for each pixel:
The maze generator can take the same image back as input to generate the exact same maze, or other images to generate new mazes. Obs: Images which contain undefined pixel colors are to be rejected.
The client, represented by an agent strategy, and the server will communicate with each other through a series of JSON commands. The first time a client connects to a server it gets assigned a UUID, thus the server will distinguish between a new connection and a reconnection attempt based on the UUID.
The first connection from an agent will always be an empty JSON, whereas every recconection will be a JSON containing the UUID, in the following format:
{ "UUID": "" }
{ "UUID": "", "x [optional]": "", "y [optional]": "", "width [optional]": "", "height [optional]": "", "view": "string of the matrix representation of the visible area around the agent" "moves": "total number of moves/commands available for the agent in the first turn" }
In a normal turn the agent sends a JSON to the server in the following format: {input: “string of commands up to length 10”}
The server will output back a JSON with the following format:
{ "command_1": { "name": "name of command, ex: "N"", "successful": "0|1", "view": "string of the matrix representation of the visible area around the agent after the move;" ex for 3x3: "[0, 255, 255; 0, 255, 0; 0, 255, 0]" }, "command_2": { "name": "", "successful": "", "view": "" }, ... "command_N": { "name":"", "successful": "", "view": "" }, "moves": "total number of available moves for the next turn" }
In the case of a friendly solve, the server will always output the value of a trap if it's inside the agent's visible area. However, in the case of an unfriendly solve, traps are only shown if the agent is 1 tile away from them and their type is hidden using the value of 90.
Once an agent solves a maze, or the server decides the agent is taking too long so it gets timed out, the server will send a JSON with the following format:
{ "end": "0|1, based on if the agent solved the maze or not" }
Following a solve, the server can test the agents on a new maze, for this it sends a request in the following format:
{ "x [optional]": "", "y [optional]": "", "width [optional]": "", "height [optional]": "", "view": "string of the matrix representation of the visible area around the agent" "moves": "total number of moves/commands available for the agent in the first turn" }
The server can store generated mazes as images and output them back on request.
An agent can work in one of two modes:
Each agents performance is measured in one of three ways:
For the real-time mode the agents will have a maximum time allotted before sending each command. If the allotted time expires, the agent is timed out and disqualified, and the maze is considered unsolved. The maximum time can be set before each run, or be preset depending on the maze difficulty.
The viewer should output the maze and the agents solving it in the following manner:
After the initial phase of developing the project: For a successful collaboration, the teams should consider the following:
The project is worth 6 points and is split into 3 major milestones, which will happen in Labs 3, 8, and 12. The milestones and their allocated points are as follows: