Skip to content

An automated game of catching Pokemons, going around and having fun, just resting on some nodes of a Weighted and Directed graph model, with our Agents.

Notifications You must be signed in to change notification settings

shaCode256/Weighted-and-Directed-Graph-Model-Pokemon-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open source

Written in Java

Catch 'Em All- catch pokemons automated game / Weighted and Directed Graph Model - 12/2020

The project implements an automated game of catching Pokemons, going around and having fun, just resting on some nodes of a Weighted and Directed graph model, with our Agents. You can happily watch our agents try to catch the pokemons, when they need to earn the most points, By catching the most valueble pokemons.

Features 24 different levels, with raising difficulity.

WelcomeScreen

Let's take a brief look inside-

Level 17!

level17

DWGraph_DS

The project implements a Weighted and Directed graph model, using data structures including HashMaps to represent the nodes and neighborhood relationships between them.

Creating a graph and nodes (part of a test): Test_graph

Another test for the DWGraph: Running Tests0

This graph functions include:

  • Saving the graph into a file
  • Loading a graph from a file
  • Find the shortest route between two nodes using Dijkstra's algorithm, implemented by a queue
  • Returning the shortest path's between two nodes weight
  • Adding and deleting nodes to a graph
  • Add and delete neighbors to nodes in the graph
  • Receiving the neighbors of a particular junction
  • Adding information to the nodes themselves, in two information values ("variables") for each node
  • Checking the connectivity of the graph
  • Deep copy of the graph

Also, there are some rich tests for you to test almost everything in there. Got any additions/ comments? I would love to hear.

How to use?

Download the code and put it where you can access it. You can start creating a graph by the command WGraph_DS g = new Wgraph_DS <> (); Then add nodes using the g.addNode (new NodeInfo (your desired new node key)) command. Continue as you wish. The project is full of descriptions about the functions and their use.

Let's take a look inside-

Pictures to help and visualize how it's going:

Creating a graph: Creating a graph

Creating Nodes: Creating Nodes

Running Tests0: Update- the new ver. is with time stamps Running Tests0

Running Tests1: Running Tests1

!Running Tests2: Running Tests2

GraphAlgo(rithms): GraphAlgo(rithms)

The HashMap of the graph strcture: HashMap- Graph structure

Find us at GitHub: ShaCode256@ Dvir-Segal@

-Third assignment in computer science and mathematics studies at Ariel University, second year.

פרויקט- מודל גרף ממושקל ומכוון- 12/2020

הפרויקט מממש מודל גרף ממושקל ומכוון, באמצעות מבני נתונים ובתוכם HashMaps לייצוג הצמתים וקשרי השכנויות בינהם.

טיפוס הגרף בעל פונקציות, בין היתר:

  • הוספת ומחיקת צמתים לגרף
  • הוספת ומחיקת שכנים לצמתים בגרף
  • קבלת השכנים של צומת מסוים
  • הוספת מידע לצמתים עצמם, בשני ערכי מידע ("משתנים") לכל צומת
  • מציאת המסלול הקצר ביותר בין שני צמתים באמצעות אלגוריתם Dijkstra - מימוש באמצעות תור
  • בדיקת קשירות הגרף
  • העתקה עמוקה של הגרף

תמונות למעלה

איך להשתמש?* הורידו את הקוד ושמרו אותו כך שתוכלו לגשת אליו**. אפשר להתחיל ביצירת גרף על ידי הפקודה WGraph_DS g = new WGraph_DS<>(); , לאחר מכן להוסיף צמתים באמצעות הפקודה g.addNode(new NodeInfo(yourDesiredKeyNode)) ומשם להמשיך כאוות נפשכם. הקוד מלא בתיאור הפונקציות והשימוש בהם.

@מצאו אותנו בגיטהאב ShaCode256 Dvir-Segal@

מטלה שלישית במסגרת לימודי מדעי המחשב ומתמטיקה באוניברסיטת אריאל בשומרון, שנה ב'.

About

An automated game of catching Pokemons, going around and having fun, just resting on some nodes of a Weighted and Directed graph model, with our Agents.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages