updated readme
This commit is contained in:
parent
06306fdf55
commit
dedc997c9d
25
README.md
25
README.md
@ -21,16 +21,16 @@ completing the following steps of the project:
|
|||||||
- solving it;
|
- solving it;
|
||||||
- writing the solution to the file-system;
|
- writing the solution to the file-system;
|
||||||
|
|
||||||
an idea came to my mind, add the feature of visualizing the progress of the
|
an idea came to my mind: add the feature of visualizing the progress of the
|
||||||
solving algorithm by opening a window that displays the current solution. Well,
|
solving algorithm by opening a window that displays the progress of the solver.
|
||||||
each module (readers, writers and solvers) were design to be as decoupled as
|
Well, each module (readers, writers and solvers) were design to be as decoupled
|
||||||
possible, and it allowed me to implement the `visualizer` feature in only a
|
as possible, and it allowed me to implement the `visualizer` feature in only a
|
||||||
couple of hours (which I was honestly not expecting).
|
couple of hours (which I was honestly not expecting).
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- `go >= 1.21`
|
- `go >= 1.21`
|
||||||
- `ffmpeg` (optional, for video visulazation)
|
- `ffmpeg` (optional, for video visualization, see [visualization methods](#visulazation-methods)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ After downloading `maze-solver` from the
|
|||||||
it with the following arguments
|
it with the following arguments
|
||||||
|
|
||||||
| Short | Long | Default | Description |
|
| Short | Long | Default | Description |
|
||||||
| ----- | ----------------- | ---------- | ------------------------------------------------------------------------------------------------ |
|
| ----- | ----------------- | ---------- | ---------------------------------------------------------------------------------------- |
|
||||||
| -h | --help | | Print help information |
|
| -h | --help | | Print help information |
|
||||||
| -v | --verbose | 0 | Verbose level of the solver see [verbose levels](#verbose-levels) |
|
| -v | --verbose | 0 | Verbose level of the solver see [verbose levels](#verbose-levels) |
|
||||||
| -i | --input | `maze.png` | Input file |
|
| -i | --input | `maze.png` | Input file |
|
||||||
@ -50,7 +50,7 @@ it with the following arguments
|
|||||||
| | --wall-char-out | `'#'` | Character to represent the wall in an output text file. |
|
| | --wall-char-out | `'#'` | Character to represent the wall in an output text file. |
|
||||||
| | --cell-size-in | 3 | Size of a cell (in pixels) for input file of image type. |
|
| | --cell-size-in | 3 | Size of a cell (in pixels) for input file of image type. |
|
||||||
| | --cell-size-out | 3 | Size of a cell (in pixels) for output file of image type. |
|
| | --cell-size-out | 3 | Size of a cell (in pixels) for output file of image type. |
|
||||||
| -a | --algo | a-star | Algorithm to solve the maze<br> Available options: <ul><li>dfs<li>bfs<li>dijkstra<li>a-star</ul> |
|
| -a | --algo | a-star | Algorithm to solve the maze see [solving algorithms](#solving-algorithms) |
|
||||||
| | --visualize | | Visualizer the progress of the solver see [visualization methods](#visulazation-methods) |
|
| | --visualize | | Visualizer the progress of the solver see [visualization methods](#visulazation-methods) |
|
||||||
| | --video-name | `sol.mp4` | Name of the output file if --visualize is set to 'video'. |
|
| | --video-name | `sol.mp4` | Name of the output file if --visualize is set to 'video'. |
|
||||||
| | --video-framerate | 60 | Framerate of the video if --visualize is set to 'video'. |
|
| | --video-framerate | 60 | Framerate of the video if --visualize is set to 'video'. |
|
||||||
@ -66,9 +66,18 @@ it with the following arguments
|
|||||||
|
|
||||||
### Visualization methods
|
### Visualization methods
|
||||||
|
|
||||||
| option | description |
|
| Option | Description |
|
||||||
| ------ | ---------------------------------------------------------------------- |
|
| ------ | ---------------------------------------------------------------------- |
|
||||||
| window | will give a live feed of the solver |
|
| window | will give a live feed of the solver |
|
||||||
| video | creates a video where each frame is a step the solving algorithm takes |
|
| video | creates a video where each frame is a step the solving algorithm takes |
|
||||||
|
|
||||||
|
### Solving algorithms
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
| -------- | -------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| dfs | [Depth-first search](https://en.wikipedia.org/wiki/Depth-first_search "Wikipedia: Depth-first search") |
|
||||||
|
| bfs | [Breadth-first search](https://en.wikipedia.org/wiki/Breadth-first_search "Wikipedia: Breadth-first search") |
|
||||||
|
| dijkstra | [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm "Wikipedia: Dijkstra's algorithm") |
|
||||||
|
| a-star | [A\*](https://en.wikipedia.org/wiki/A*_search_algorithm "Wikipedia: A* search algorithm") |
|
||||||
|
|
||||||
<!-- ## Examples -->
|
<!-- ## Examples -->
|
||||||
|
Loading…
Reference in New Issue
Block a user