Home - ShiraAnaki130/OOP_ex2 GitHub Wiki

pokemon challenge

What is the pokemon challenge?

The pokemon challenge is a game where agents try to catch as many pokemons as possible. The game has 24 scenarios of playgrounds ([0,23]). playgrounds are graphs on which pokemons spawn. The agents travel on the playgrounds and catch every pokemon they meet. The agents movement is based on algorithms that try to find the best route possible.

How pokemon challenge is built?

The playground

Each playground scenario is a directed graph and The length of the edges is based on The edges weight. The graph has a collection of vertexes with a unique key, weight, and location on the map. In addition, the graph is connected by directed edges with a source vertex to a destination vertex.

The agents

The agents icon is a Pokeball, and each one has a unique id and cash credit. The agent moves from each vertex on the graph by the destination of the connected edges.
The agents can catch the pokemon if they travel in the same direction as the pokemon. For each pokemon, they catch they get credit for the value of the pokemon and the speed they are moving will grow. If the agent finds that their pokemon target is more than 3 edges away and they are too slow they will speedup for this target. The agents sort the pokemons by value and choose the closest pokemon on board. They move by the shortest path to the correct position to catch the pokemon. The agents try not to go to the same pokemon and set a mark for each edge that has a pokemon on it in the path they are going, and the others skip to other pokemons.

The pokemons

there are two kinds of pokemons, friendly and hostile. Each pokemon has credit points for the agents to collect, each time the agents eat the pokemon another one will appear. The friendly pokemons have a direction from a small key to a bigger key and the type of the pokemon is 1. The hostile pokemons have a direction from a big key to a smaller key and the type of the pokemon is -1.

How the game goes?

The player has to log in with an ID and choose a scenario from [0,23]. In each scenario, the agents have a certain amount of time to catch as many pokemons as they can. They are starting the game in the correct position to catch the pokemon with the biggest value on the board. The agent selects the next pokemon by his distance from the current pokemon they are about to catch, if there is more then one agent, the agents check if the pokemon is a target for other agents and try to go to the next closest pokemon. The movement of the agent is by the shortest root they find to the correct position to catch the pokemon.

Game scoreboard