Giter Site home page Giter Site logo

artificial-intelligence's Introduction

Artificial Intelligence Implementing various search algorithms

Programming language: python3

Implemented the search algorithm using A* search and uniform cost search algorithms

In file find_route.py parse_argument parses command line arguments and identifies if it's a uninformed or informed search if the heuristic file is specified in the command line arguments A* search algorithms will be used else uniform cost search will be used Function read_file will read the input file and store the graph information in a dictionary. and function read_heuristic_file will read the heuristic file and store the information as dictionary The function uniform_cost_search and astar_search expands the graph and finds the number of nodes expanded and generated along with the distance information the path is found by backtracking the parent node from which we found the optimal path to the destination. The output function prints the output to console after running the program

Commnads to run on local system: Copy all the files in same folder. Open terminal and type

For Informed search type python3 find_route.py input1.txt Bremen Kassel h_kassel.txt

For uninformed search python3 find_route.py input1.txt Bremen Kassel

references: https://www.redblobgames.com/pathfinding/a-star/implementation.html https://towardsdatascience.com/a-star-a-search-algorithm-eb495fb156bb

artificial-intelligence's People

Contributors

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