updated readme

This commit is contained in:
Karma Riuk 2023-08-27 13:33:22 +02:00
parent 06306fdf55
commit dedc997c9d

View File

@ -21,16 +21,16 @@ completing the following steps of the project:
- solving it;
- writing the solution to the file-system;
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,
each module (readers, writers and solvers) were design to be as decoupled as
possible, and it allowed me to implement the `visualizer` feature in only a
an idea came to my mind: add the feature of visualizing the progress of the
solving algorithm by opening a window that displays the progress of the solver.
Well, each module (readers, writers and solvers) were design to be as decoupled
as possible, and it allowed me to implement the `visualizer` feature in only a
couple of hours (which I was honestly not expecting).
## Dependencies
- `go >= 1.21`
- `ffmpeg` (optional, for video visulazation)
- `ffmpeg` (optional, for video visualization, see [visualization methods](#visulazation-methods)
## Usage
@ -39,7 +39,7 @@ After downloading `maze-solver` from the
it with the following arguments
| Short | Long | Default | Description |
| ----- | ----------------- | ---------- | ------------------------------------------------------------------------------------------------ |
| ----- | ----------------- | ---------- | ---------------------------------------------------------------------------------------- |
| -h | --help | | Print help information |
| -v | --verbose | 0 | Verbose level of the solver see [verbose levels](#verbose-levels) |
| -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. |
| | --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. |
| -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) |
| | --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'. |
@ -66,9 +66,18 @@ it with the following arguments
### Visualization methods
| option | description |
| Option | Description |
| ------ | ---------------------------------------------------------------------- |
| window | will give a live feed of the solver |
| 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 -->