From 109c26f8fce648b69bfc5c03805d5fc8eb00b35d Mon Sep 17 00:00:00 2001 From: SneakyGerbil <68425553+SneakyGerbil@users.noreply.github.com> Date: Sat, 13 Nov 2021 11:58:56 +0100 Subject: [PATCH] Fixed some errors in the documentation --- README.md | 4 ++-- docs/base_algorithm_methods.md | 2 +- docs/custom_algorithms.md | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b0e426d..a57af38 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ SSSV makes understanding state space search algorithms intuitive. It represents ![edit](docs/images/edit.gif) -- **Precise controls** let the user step through each step of the algorithm. +- **Precise controls** let the user step incrementally through the search algorithm. ![controls](docs/images/control_menu.gif) @@ -30,7 +30,7 @@ Adding custom algorithms is simple. The algorithm's `gd` file just needs to be p For a more detailed explanation on developing and adding custom algorithms, refer to the [custom algorithms documentation](docs/custom_algorithms.md). ## Dependencies -This project was made using the [Godot Game Engine](https://godotengine.org/). A free and open source game engine which I would very much recomend anyone to checkout. It's github page can be found [here](https://github.com/godotengine/godot). +This project was made using the [Godot Game Engine](https://godotengine.org/). A free and open source game engine, I would very much recommend checking out. Its github page can be found [here](https://github.com/godotengine/godot).

Godot Engine logo diff --git a/docs/base_algorithm_methods.md b/docs/base_algorithm_methods.md index ce0b472..bc227b2 100644 --- a/docs/base_algorithm_methods.md +++ b/docs/base_algorithm_methods.md @@ -1,6 +1,6 @@ # BaseSearchAlgorithm Class -The `BaseSearchAlgorithm` class is extended by all search algorithms. It includes usefull methods common to most search algorithms. +The `BaseSearchAlgorithm` class is extended by all search algorithms. It includes useful methods common to most search algorithms. ## Methods diff --git a/docs/custom_algorithms.md b/docs/custom_algorithms.md index 785d83c..afab89e 100644 --- a/docs/custom_algorithms.md +++ b/docs/custom_algorithms.md @@ -1,6 +1,6 @@ # Developing Custom Algorithms -A [custom algorithm `gdscript` file containing the basic search algorithm structure](search_algorithm.gd) can be found among the documentation. It's code is as follows: +A [search algorithm template](search_algorithm.gd) containing the basic structure is provided within the documentation. Its code is as follows: ```gdscript # Extend BaseSearchAlgorithm to have useful methods extends "res://Code/BaseSearchAlgorithm.gd" @@ -19,14 +19,14 @@ func expand(CP, path): pass ``` -The algorithm extends the [`BaseSearchAlgorithm.gd`](base_algorithm_methods.md), which contains some [very useful methods](base_algorithm_methods.md) such as ordering the path list, `CP`, by cost or heuristic. +The algorithm extends [`BaseSearchAlgorithm.gd`](base_algorithm_methods.md), which contains some [very useful methods](base_algorithm_methods.md) such as ordering the path list, `CP`, by cost or heuristic. The `expand` method is the most important. It must modify CP so that it contains the paths that should be considered in next steps. - `CP` contains all the paths to consider in future steps. - `path` contains the path being checked in the current expand method call. The `Graph2D` methods `getUnvisitedNeighbours(pos:Vector2)` and `getAllNeighbours(pos:Vector2)` are crucial to expand the path buffer. These methods return a list of the unvisited or all neighbours, respectively, of the tiles located at `pos` on the `Graph2D`. -> NOTE: Since paths are objects, they are passed by reference. To add a new path to `CP` without editing the existing ones, neighbours shoud be added to a clone of the checked path. A path can be cloned with it's `duplicate()` method. +> NOTE: Since paths are objects, they are passed by reference. To add a new path to `CP` without editing the existing ones, neighbours shoud be added to a clone of the checked path. A path can be cloned with its `duplicate()` method. ## Algorithm Usage The `Graph2DSearch` class will use the algorithm defined: