8-puzzle in Python with bfs (Breadth First Search); dfs (Depth First Search); ast (A Star Search) solvers
€8-30 EUR
Completed
Posted over 7 years ago
€8-30 EUR
Paid on delivery
Solves any 8-puzzle in PYTHON 2, when given an arbitrary starting configuration.
Starting:
| 1 | 2 | 5 |
| 3 | 4 | 0 |
| 6 | 7 | 8 |
Goal:
| 0 | 1 | 2 |
| 3 | 4 | 5 |
| 6 | 7 | 8 |
The program will be executed as follows:
$ python [login to view URL] <method> <board>
The method argument will be one of the following but all have to be implemented
bfs (Breadth-First Search)
dfs (Depth-First Search)
ast (A-Star Search)
The board argument will be a comma-separated list of integers containing no spaces.
For example, to use the bread-first search strategy to solve the input board given by the starting configuration {0,8,7,6,5,4,3,2,1}, the program will be executed like so (with no spaces between commas):
$ python [login to view URL] bfs 0,8,7,6,5,4,3,2,1
When executed, the program will create / write to a file called [login to view URL], containing the following statistics:
path_to_goal: the sequence of moves taken to reach the goal
cost_of_path: the number of moves taken to reach the goal
nodes_expanded: the number of nodes that have been expanded
search_depth: the depth within the search tree when the goal node is found
max_search_depth: the maximum depth of the search tree in the lifetime of the algorithm
running_time: the total running time of the search instance, reported in seconds
max_ram_usage: the maximum RAM usage in the lifetime of the process as measured by the ru_maxrss attribute in the resource module, reported in megabytes
The command
$ python [login to view URL] bfs 1,2,5,3,4,0,6,7,8
has to give ([login to view URL])
path_to_goal: ['Up', 'Left', 'Left']
cost_of_path: 3
nodes_expanded: 10
search_depth: 3
max_search_depth: 4
running_time: 0.00188088
max_ram_usage: 0.07812500
the command
$ python [login to view URL] dfs 1,2,5,3,4,0,6,7,8
has to give ([login to view URL])
path_to_goal: ['Up', 'Left', 'Left']
cost_of_path: 3
nodes_expanded: 181437
search_depth: 3
To solve 8-puzzle problem using python. 7 years of programming experience including perticipation of various programming contest. And an embedded system engineer.
Relevant Skills and Experience
Python, Algorithm, Data structure
Proposed Milestones
€100 EUR - milestone
It should be a simple task for me. Let me know if you are interested?
I am an undergraduate with knowledge with algorithms such as A* search, wave front, etc. Moreover I am good with coming up with algorithmic solutions and coding them. I am certain i can do this task.
Relevant Skills and Experience
Python Programming
Algorithms
AI
Programming
Proposed Milestones
€10 EUR - A-star search method
€10 EUR - Breadth-first search method
€10 EUR - Depth-first search method