Giter VIP home page Giter VIP logo

ejupialked / ai-search-algorithms Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 3.12 MB

Implementation of Depth First Search, Breadth First Search, Iterative Deepening and A* for solving a puzzle game. This is part of a coursework assignment for Intelligent Systems module (COMP2208 - @ University of Southampton)

License: MIT License

Java 100.00%
bfs ids astar dfs puzzle-game puzzle-solver artificial-intelligence-algorithms search-algorithm ascii-art box-drawing

ai-search-algorithms's Introduction

Blocks world tile puzzle - AI Search Methods

This puzzle consists of three tiles "A", "B" and "C" and the agent which can only move up, down, left and right. The agent's goal is to place the tiles in a specific pattern.

Example Agent moves

Example

The problem to solve

This is by the default the problem used to test the four search methods. The final position of the agent does not matter. H

Project Structure (Java)

The way I have structured my code is described in the UML diagram down below. Example

Dependencies

  • Encoding UTF-8 supported on your terminal, the output is displayed using box-drawings characters.
  • Java installed on your machine.

Executing one of the four algorithms

  • compile main class
> javac Main.java
  • run Main class with one argument defining the strategy ("BFS", "IDS", "DFS" or "AStar"). For example,
> java Main "IDS"

A* on operation ๐Ÿš€

astarGif

Issues

When running BFS you might get an error like this:

java.lang.OutOfMemoryError: Java heap space

To overcome this issue increase the Java heap memory size by at least 10GB passing these parameters:

> java -Xms10000m -Xmx15000m  Main "BFS"

Author

Alked Ejupi Copyright (2019). All rights reserved.

Reference

Peter Norvig Stuart Russel. Artificial Intelligence - A modern approach (3rd edition). Prentice Hall Press Upper Saddle River, NJ, USA, 2009.

ai-search-algorithms's People

Contributors

ejupialked avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.