Skip to content

Eashwar-S/8_Puzzle_Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

8 puzzle Problem

8 puzzle problem implemented by using Brute Force Search.

Description

This code contains the implementation of brute force seach algorithm to solve the 8 puzzle problem. There are four acions carried out on the blank tile by mowing it to attain the final output namely:

  1. Move Right
  2. Move Left
  3. Move Up
  4. Move Down For simplicity the blank tile has the value 0.

Dependencies

python -version 3

Library

Numpy

Run Code

Enter the following to run the python file.

cd [to 'source code' directory containing eight_puzze.py file]
python3 eight_puzzle.py

Input Instruction:

As soon as you run the program, the following prompt occurs in the command window:

Enter 9 elements of the puzzle:

Please enter the elements of the matrix row wise typing enter

Enter 9 elements of the puzzle:
1
3
2
4                   
5
6
8
0
7

The program takes input in the form

1 3 2
4 5 6
8 0 7

Please don't press space after typing numbers. Only press enter as it may give errors.

Textfile generation

Text files will be generated outside source code folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages