Giter Site home page Giter Site logo

astar's Introduction

astar

C++ GUI for completing A* given a JSON file of obstacles and start/end coordinates. It is a simple GUI built on Gtkmm, a library of wrapper functions around gtk+ for use in C++.

A* is a path finding algorithm used for robots navigating through static maps (i.e. obstacle coordinates are static). Each node in the grid is defined by a movement cost (g) and the distance from the goal node (h). These two values are added to form "f" and nodes with the smallest "f" value are explored first. Starting from the "robotStart" coordinates, all the neighboring cells are processed and added on the "open set" if they are valid (i.e. not an obstacle, not already on the open set). Once all neighboring cells are processed, this node is placed on the "closed set." Its "g" value is only updated when it is a neighboring node of the node currently being explored and this node has a smaller "g" value than when previously encountered (i.e. the current path to this node takes fewer steps than when it was previously explored).

The JSON file must contain the fields "obstacles," "robotStart," and "robotEnd." The program allocates memory on the heap to house a grid of nodes defined as either obstacles or free-space. The grid dimensions are dynamically allocated based on the maximum value among the obstacles, robotStart, and robotEnd coordinates. Sample output maps contain the .png extension.

astar's People

Contributors

fultoncjb 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.