Coder Social home page Coder Social logo

searchusa_ai's Introduction

SearchUSA_AI

Solution to a Pathfinding Agent problem which keeps travelling between different cities of USA and Canada. Reference to AI Class

This code implements a Uniform Cost Search, GreedySearch and A Star Search on the US map given in the question.

Please call SearchUSA searchtype srccityname destcityname as given in the question where searchtype can be astar, greedy or uniform.

This code uses some data structures and constructs from the C++ Standard Template Library(STL) The code can be built and run in any compilation environment with STL C++11 support.

VERY IMPORTANT :: PLEASE include -std=gnu++0x in your compiler options if running in Remote Server as the compiler of the server is little outdated.

Example command for compiling: g++ -std=gnu++0x graph.cpp node.cpp SearchUSA.cpp -o SearchUSA

Where SearchUSA is the executable.

You can also compile the source using the makefile given in the same directory. run "make all" or "make" from the directory where the source code is. The compilation will create the executable SearchUSA which can be used for search queries in the format requested in the question.

the folder should contain the following files for the whole code to run

  1. graph_builder.h -> helper to set up the graph Data Structure in memory using HashMaps of Nodes
  2. graph.cpp -> Parent class which hold the graph and the search algorithms
  3. node.cpp -> The class designed for the cities which are the nodes of the graph. Evry node will have an Adjacency list for move generation
  4. SearchUSA -> Master Driver program */

searchusa_ai's People

Contributors

himangshunits avatar

Watchers

James Cloos avatar  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.