Giter Club home page Giter Club logo

maze-game-using-a-algorithm-with-visualization's Introduction

Maze-Game-using-A-Algorithm-with-visualization

                                                I. PROBLEM

To develop a game board which aims to find path from starting point to destination on a nn box. There will be a user starting from first block who has to reach some designated block. On the way some in some cells there will be opponents who has some weights. Whenever user comes across one opponent, he will lose some points (representing low health points). If the point of user drops to zero, the game is over. The algorithm will find the path with maximum points. The algorithm used is A algorithm along with the visualization.

                                              II. A* ALGORITHM

A* is a very efficient algorithm and initially, the prime objective of the Algorithm was graph traversal problem to find the shortest path between two points. For the given problem statement, we implemented this approach to find the path which will have largest weights. A* actually extends the Dijkstra's algorithm along with some characteristics of breadth-first search (BFS). The main backbone of the algorithm is the heuristic function h, f and g. The heuristic function calculates the estimated total points from current node to end node, whereas the g function calculates the distance from start node to current node. The function f is the sum of both h and g. The next node to traverse is chosen according to the f value.

                                    III. SOFTWARE DESIGN AND IMPLEMENTATION

A. SoftwareDesign

First we have to initialize the open_list and closed_list and add the starting cell to the open_list. For each node in open_list, we check for any children nodes possible. We traverse through the matrix until there are no more child nodes or until we reach the destination node. The next node is selected based on the calculated f value of each child node. The node with greatest f value will be taken as the next node. The h value is dependent on the weight each cell possess. The function is called recursively till the open_list is empty.

B. Implementation and Tools Used Here, A* is implemented in Python as per the algorithm. For the visualization purpose, we can use the turtle package of Python.

Screen Shot 2022-07-15 at 6 41 19 PM

Screen Shot 2022-07-15 at 6 42 15 PM

maze-game-using-a-algorithm-with-visualization's People

Contributors

athiranirmal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.