From dedc997c9d920439f9bd947be3bc2d310349a518 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sun, 27 Aug 2023 13:33:22 +0200 Subject: [PATCH] updated readme --- README.md | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 72cc548..602d568 100644 --- a/README.md +++ b/README.md @@ -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 @@ -38,22 +38,22 @@ After downloading `maze-solver` from the [assets of the latest release](releases/latest "Latest release"), you can use 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 | -| -o | --output | `sol.png` | Output file | -| | --path-char-in | `' '` | Character to represent the path in an input text file. | -| | --wall-char-in | `'#'` | Character to represent the wall in an input text file. | -| | --path-char-out | `' '` | Character to represent the path 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-out | 3 | Size of a cell (in pixels) for output file of image type. | -| -a | --algo | a-star | Algorithm to solve the maze
Available options: | -| | --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'. | +| 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 | +| -o | --output | `sol.png` | Output file | +| | --path-char-in | `' '` | Character to represent the path in an input text file. | +| | --wall-char-in | `'#'` | Character to represent the wall in an input text file. | +| | --path-char-out | `' '` | Character to represent the path 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-out | 3 | Size of a cell (in pixels) for output file of image type. | +| -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'. | ### Verbose levels @@ -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") | +