Giter VIP home page Giter VIP logo

artificial-intelligence-state-space-search's Introduction

Artificial Intelligence State Space Search

- Introduction

State space search is a process used in the field of computer science, including artificial intelligence (AI), in which successive configurations or states of an instance are considered, with the goal of finding a goal state with a desired property. [1]

- Searches Covered Here

The following are the searches with their frontiers as:

  • Depth First Search (DFS) - Stack/Recursion
  • Breadth First Search (BFS) - Queue
  • Iterative Deepening Search (IDS) - Stack/Recursion + Queue
  • Greedy Best First Search (Greedy) - Priority Queue
  • A Star Search (A*) - Priority Queue

- Problem Statement

We are given a 2D grid (N x M dimensions) in which our goal is to reach from source to destination using the minimum (optimal) path.

Example:

For Grid:
0 0 0 0 0 
1 0 1 1 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0

Source: (0, 0)
Destination: (4, 4)
Optimal Path Cost: 5
Optimal Path: {(0, 0) -> (1, 1) -> (2, 2) -> (3, 3) -> (4, 4)}

Each Problem will run with their own time complexity but will give the same output as above for the same configuration

Solution

The solution is for N x M dimensional grid. Algorithms optimize their route to find the shortest path as fast as possible. There are 3 input files given that can be tested, whilst other (your own or you friends) test cases can run aswell.

To create the testcase file, the format is as:

N M
source_x source_y
destination_x destination_y
grid of NxM dimensions

- Animations

  • DFS vs BFS Animation

BFSvsDFS

  • Iterative Deepening Search Animation

IDS

  • A Animation*

A*Animation

- References

[1] Wikipedia - State Space Search

artificial-intelligence-state-space-search's People

Contributors

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