-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Writing an algorithms for a pokemon game.
In this project we got an online server for a pokemon game, in the game we have the agents and the pokemon,
our task was to create an algorithm to catch as many pokemons as possible with as last moves as possible, the pokemons and agents move on a directed weigthed graph.
our idea was to go over all the agents and assign for each one of them a pokemon to catch, we assign the pokemons to the agent according to which pokemon is closer to the agent. We use the shortest path function from the graph algorithms to find the closer pokemon to a specific agent.
In this project we used in our last project assignment to create an directed weigthed graph, so we took the the classes we create there to this project, beside th graph classes we have 3 more classes,
- client
- main
- algorithms The client is responisible on the server and was giving to us from the begining. The main class we created runs all the code and algorithms of the priject so the game can run. The algorithms class contain the four main function to run the game.
The directory of the directed weighted graph contains:
| Class | Description |
|---|---|
| NodeData | represents a vertices on the grap |
| Point3D | represents a 3 coordinates point |
| DiGraph | represents an graph based on the vertices and edges |
| GraphAlgo | a data structure based on the DirectedWeightedGraph structrue that offers variuos algorithms |
The src directory containing the directory above and the rest of the class:
| Class | Description |
|---|---|
| algorithms | represents the main algorithms |
| main | responsible to execute the game using all the algorithms and classes |