-
Notifications
You must be signed in to change notification settings - Fork 0
The Logic Behind
At the start of the game, the server will provide the number of agents and pokemon, according to the current scenario,
While the pokemon will appear on random edges, the starting position of the agents is for the player choosing.
For maximize score, we chose to place the agents near the highest value pokemon.
From this point, the game will run.
The algorithm we chose is for each agent to calculate the distance between its location, to all the given pokemon's.
The agent will choose a the pokemon to chase by the shortest path algorithm - that way we make sure the number of caught
pokemon is the highest.
As said at the home page, the final grade is calculated by the value of all the pokemons caught and the number of moves that were taken
in the game.
To minimize the number of steps, before every move, every agent gets a target in the above method.
For each agent, we calculate how much time and distance he needs to go so he will land on the pokemon in one move.
We take the agent with the minimum time and we call the move so he will land on its locked pokemon.
To prevent the other agents from missing their target, we send them to "sleep", for as long as they need so they will wake
at the exact time so they will lend on thier pokemon, as the same time as the agent with the minimum time(the one
that does'nt go to sleep.