This shows you the differences between two versions of the page.
mps:proiect [2024/11/15 17:28] mihai_lucian.voncila [Server] |
mps:proiect [2024/11/22 17:27] (current) giorgiana.vlasceanu [Game Mechanics] |
||
---|---|---|---|
Line 20: | Line 20: | ||
*Tower tile: The player can see in an area of 7x7 around this tile (X-RAY points can still be used) | *Tower tile: The player can see in an area of 7x7 around this tile (X-RAY points can still be used) | ||
*Traps, which can be seen at a max of 2 steps away from them, and are of multiple kind, with a number n assigned to them: | *Traps, which can be seen at a max of 2 steps away from them, and are of multiple kind, with a number n assigned to them: | ||
+ | *traps are not disabled when activated by walking over them | ||
*movement decrease: decreases the maximum number of steps you can send to the server in the next turn by n | *movement decrease: decreases the maximum number of steps you can send to the server in the next turn by n | ||
*rewind: the players last n moves are undone | *rewind: the players last n moves are undone | ||
Line 25: | Line 26: | ||
*pushback: the player is forced backwards based on the direction of their movement for n steps | *pushback: the player is forced backwards based on the direction of their movement for n steps | ||
*Portals: They work in pairs and connect one point of the maze to another. | *Portals: They work in pairs and connect one point of the maze to another. | ||
- | *Each pair has a specific id to represent a portal | + | *Each pair has a specific id to represent a portal |
+ | *To activate a portal the agent must send a command "P" while on top of one | ||
*Consumables: | *Consumables: | ||
*X-RAY point increments | *X-RAY point increments | ||
Line 37: | Line 39: | ||
*The minimum rectangular path from the entrance to the exit must cover at least 50% of the total rectangular area of the maze. | *The minimum rectangular path from the entrance to the exit must cover at least 50% of the total rectangular area of the maze. | ||
*Teams will choose the horizontal and vertical dimensions of each generated maze within specified maximum allowable ranges. | *Teams will choose the horizontal and vertical dimensions of each generated maze within specified maximum allowable ranges. | ||
- | *The maze should be able to be generated in one of three ways: | + | *The maze should be able to be generated in one of the following ways: |
*completely random, based on a fixed seed, which may or may not be provided, and a set threshold that represents the maximum of special tiles that can be generated of each type. | *completely random, based on a fixed seed, which may or may not be provided, and a set threshold that represents the maximum of special tiles that can be generated of each type. | ||
*semi-random, based on a fixed seed and a set number for each special tile that can be generated. | *semi-random, based on a fixed seed and a set number for each special tile that can be generated. | ||
Line 54: | Line 56: | ||
*32 - fog tile | *32 - fog tile | ||
*224 - tower tile | *224 - tower tile | ||
+ | *90 - reserved value for generic trap tiles (this is not used in generation, but will be sent to the agents during solve) | ||
*96-100 - trap movement tile with n = [1,5] | *96-100 - trap movement tile with n = [1,5] | ||
*101-105 - trap rewind tile with n = [1,5] | *101-105 - trap rewind tile with n = [1,5] | ||
Line 109: | Line 112: | ||
"moves": "total number of available moves for the next turn" | "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: | 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: | ||
Line 126: | Line 131: | ||
The server can store generated mazes as images and output them back on request. | The server can store generated mazes as images and output them back on request. | ||
+ | |||
+ | <note important> | ||
+ | In the case where multiple agents are on the same server, they don't interact with one other, so that each agent has a fair chance at solving the maze. For this reason, every trap triggered by an agent will only affect that specific agent, so the server needs to keep track of which agent triggered which trap. | ||
+ | </note> | ||
+ | ==== Agents ==== | ||
+ | An agent can work in one of two modes: | ||
+ | *real time: it sends the move commands to the server, receives back the success fail results and immediately follows with the next list of commands | ||
+ | *await for input: sends the list of commands, receives the results of the execution and awaits for user input before sending the next list of commands (this is done client side, not server side) | ||
+ | Each agents performance is measured in one of three ways: | ||
+ | *Least time taken to solve the maze | ||
+ | *Least number of turns taken to solve the maze | ||
+ | *Least number of moves taken to solve the maze | ||
+ | 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. | ||
+ | |||
+ | <note important>Each AI agents behaviour must be unique, avoid creating different agents that have only a minor part of their strategy modified.</note> | ||
==== Viewer ==== | ==== Viewer ==== | ||
Line 139: | Line 159: | ||
*Traps should have their value n on top of them if possible. | *Traps should have their value n on top of them if possible. | ||
*The walked path should be represented by a solid line, and the planned moves of the agent by a dashed line. | *The walked path should be represented by a solid line, and the planned moves of the agent by a dashed line. | ||
+ | *The viewer can put the server into an await for input mode, where it doesn't output back an agents results for a move till a button is pressed in the viewer. | ||
- | ==== Agents ==== | + | ==== Team collaboration ==== |
- | An agent can work in one of two modes: | + | |
- | *real time: it sends the move commands to the server, receives back the success fail results and immediately follows with the next list of commands | + | |
- | *await for input: sends the list of commands, receives the results of the execution and awaits for user input before sending the next list of commands | + | |
- | Each agents performance is measured in one of three ways: | + | |
- | *Least time taken to solve the maze | + | |
- | *Least number of turns taken to solve the maze | + | |
- | *Least number of moves taken to solve the maze | + | |
- | 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. | + | |
- | + | ||
- | <note important>Each AI agents behaviour must be unique, avoid creating different agents that have only a minor part of their strategy modified.</note> | + | |
- | + | ||
- | ==== Team collaboration ==== | + | |
- | + | ||
After the initial phase of developing the project: | After the initial phase of developing the project: | ||
For a successful collaboration, the teams should consider the following: | For a successful collaboration, the teams should consider the following: |