Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/urbanclimatefr/breadth-first-search
Implement the graph search version of breadth-first search in Java
https://github.com/urbanclimatefr/breadth-first-search
bfs-algorithm breath-first-search java vacuum-cleaner
Last synced: about 2 months ago
JSON representation
Implement the graph search version of breadth-first search in Java
- Host: GitHub
- URL: https://github.com/urbanclimatefr/breadth-first-search
- Owner: urbanclimatefr
- License: gpl-3.0
- Created: 2022-05-22T09:20:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-24T07:11:45.000Z (over 2 years ago)
- Last Synced: 2024-11-05T14:27:20.625Z (about 2 months ago)
- Topics: bfs-algorithm, breath-first-search, java, vacuum-cleaner
- Language: Java
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Breadth-First Search
Implement the graph search version of breadth-first search (as described in AIMA Chapter 3 Section 3.4.1) in Java to solve the small problem described below. The implementation does not need to be a generic breadth-first search, it can be specific to this problem. In particular, a state may be represented with a single integer, and the expansion of a node can be implemented with a simple look-up table, indexed by an integer s and containing a list of integers (representing the states adjacent to s).
The problem scenario is the vacuum world. The diagram of all 8 states is shown below. Each state has a number in red. You will need to represent the states and transitions shown in the diagram in your program in some form. For example, state 1 expands to states 1, 2 and 3 (by the actions Left, Right and Suck).
Note: AIMA refers to Artificial Intelligence: A Modern Approach, by Stuart Russell and Peter Norvig
![image](https://user-images.githubusercontent.com/60503179/169688495-def48632-72a4-4e7b-9b32-e3e6e1da0f34.png)
Fig. 1. State diagram.The initial state is state 1, and the goal states are 7 and 8.