diff --git a/CMakeLists.txt b/CMakeLists.txt index 118fc51a7..220d2f9ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12) # Project + versions #----------------------------------------------------------------------------------------------------------------------- -project(ViZDoom VERSION 1.2.3) +project(ViZDoom VERSION 1.2.4) set(ViZDoom_VERSION_STR ${ViZDoom_VERSION_MAJOR}.${ViZDoom_VERSION_MINOR}.${ViZDoom_VERSION_PATCH}) set(ViZDoom_VERSION_ID ${ViZDoom_VERSION_MAJOR}${ViZDoom_VERSION_MINOR}${ViZDoom_VERSION_PATCH}) diff --git a/docs/api/cpp/doomGame.md b/docs/api/cpp/doomGame.md index 4e3866dd6..4616164ca 100644 --- a/docs/api/cpp/doomGame.md +++ b/docs/api/cpp/doomGame.md @@ -36,7 +36,7 @@ The game can be initialized again after being closed. | C++ | `void newEpisode(std::string recordingFilePath = "")` | | :-- | :-- | -| Python | `new_episode(recording_file_path: str = "") -> None` | +| Python | `new_episode(recording_file_path: str = "") -> None` | Initializes a new episode. The state of an environment is completely restarted (all variables and rewards are reset to their initial values). After calling this method, the first state from the new episode will be available. @@ -52,7 +52,7 @@ Note: Changed in 1.1.0 | C++ | `void replayEpisode(std::string filePath, unsigned int player = 0)` | | :-- | :-- | -| Python | `replay_episode(file_path: str, player: int = 0) -> None` | +| Python | `replay_episode(file_path: str, player: int = 0) -> None` | Replays the recorded episode from the given file using the perspective of the specified player. Players are numbered from 1, If `player` argument is equal to 0, @@ -88,8 +88,8 @@ Returns true if the game is in multiplayer mode. See also: - [examples/python/multiple_instances.py](https://github.com/Farama-Foundation/ViZDoom/tree/master/examples/python/multiple_instances.py) -- [examples/python/cig_multiplayer.py](https://github.com/Farama-Foundation/ViZDoom/tree/master/examples/python/cig_multiplayer.py)) -- [examples/python/cig_multiplayer_host.py](https://github.com/Farama-Foundation/ViZDoom/tree/master/examples/python/cig_multiplayer_host.py)) +- [examples/python/cig_multiplayer.py](https://github.com/Farama-Foundation/ViZDoom/tree/master/examples/python/cig_multiplayer.py) +- [examples/python/cig_multiplayer_host.py](https://github.com/Farama-Foundation/ViZDoom/tree/master/examples/python/cig_multiplayer_host.py) Note: added in 1.1.2. @@ -120,11 +120,11 @@ Note: added in 1.1.5. --- ### `setAction` -| C++ | `void setAction(std::vector const &actions)` | -| :-- | :-- | -| Python | `set_action(actions: list | tuple | ndarray [float]) -> None` | +| C++ | `void setAction(std::vector const &action)` | +| :-- | :-- | +| Python | `set_action(action: list | tuple | ndarray [float]) -> None` | -Sets the player's action for the next tics. +Sets the player's action for the following tics until the method is called again with new action. Each value corresponds to a button previously specified with [`addAvailableButton`](#addavailablebutton), or [`setAvailableButtons`](#setavailablebuttons) methods, or in the configuration file (in order of appearance). @@ -135,10 +135,12 @@ or in the configuration file (in order of appearance). | C++ | `void advanceAction(unsigned int tics = 1, bool updateState = true)` | | :-- | :-- | -| Python | `advance_action(tics: int = 1, update_state: bool = True) -> None` | +| Python | `advance_action(tics: int = 1, update_state: bool = True) -> None` | -Processes the specified number of tics. If `updateState` argument is set, -the state will be updated after the last processed tic and a new reward will be calculated. +Processes the specified number of tics, the last action set with [`setAction`](#setaction) +method will be repeated for each tic. If `updateState` argument is set, +the state will be updated after the last processed tic +and a new reward will be calculated based on all processed tics since last the last state update. To get the new state, use [`getState`](#getstate) and to get the new reward use [`getLastReward`](#getlastreward). @@ -149,9 +151,10 @@ To get the new state, use [`getState`](#getstate) and to get the new reward use | :-- | :-- | | Python | `make_action(actions: list | tuple | ndarray [float], tics: int = 1) -> float` | -This method combines functionality of [`setAction`](#setaction), [`advanceAction`](#advanceaction) and [`getLastReward`](#getlastreward). -Sets the player's action for the next tics, processes the specified number of tics, -updates the state and calculates a new reward, which is returned. +This method combines functionality of [`setAction`](#setaction), [`advanceAction`](#advanceaction), +and [`getLastReward`](#getlastreward) called in this sequance. +Sets the player's action for all the next tics (the same action will be repeated for each tic), +processes the specified number of tics, updates the state and calculates a new reward from all processed tics, which is returned. --- @@ -261,7 +264,7 @@ Most useful in `SPECTATOR` mode. | C++ | `unsigned int getEpisodeTime()` | | :-- | :-- | -| Python | `get_episode_time() -> int` | +| Python | `get_episode_time() -> int` | Returns number of current episode tic. @@ -271,7 +274,7 @@ Returns number of current episode tic. | C++ | `void save(std::string filePath)` | | :-- | :-- | -| Python | `save(file_path: str) -> None` | +| Python | `save(file_path: str) -> None` | Saves a game's internal state to the file using ZDoom save game functionality. @@ -283,7 +286,7 @@ Note: added in 1.1.9. | C++ | `void load(std::string filePath)` | | :-- | :-- | -| Python | `load(file_path: str) -> None` | +| Python | `load(file_path: str) -> None` | Loads a game's internal state from the file using ZDoom load game functionality. A new state is available after loading. @@ -308,8 +311,8 @@ that were added with [`setAvailableButtons`](#setavailablebuttons) or/and [`addA --- ### `setAvailableButtons` -| C++ | `void setAvailableButtons(std::vector