![]() |
Deep RTS
|
#include <Scenario.h>
Public Types | |
| using | ActionSequenceContainer = std::vector< std::tuple< Constants::Action, const std::string > > |
Public Member Functions | |
| Scenario (const std::string &map, Config config, Criteria::ScenarioCriteria::ScenarioContainer &&criterias) | |
| void | update () override |
| Game Update Function. More... | |
| bool | evaluate (const Player &player) |
| int | reward (const Player &player) |
| virtual ActionSequenceContainer | optimalStrategy () |
| std::tuple< int, int, bool > | computeOptimalStrategy (Player &player) |
| std::tuple< int, int, bool > | optimalPlayGameStep (Player &player) |
Public Member Functions inherited from Game | |
| Game (const std::string &map_file) | |
| Game Constructor. More... | |
| Game (const std::string &map_file, Config config) | |
| ~Game () | |
| Unit & | getUnit (int idx) |
| Get a Unit via index. More... | |
| uint32_t | getMaxFPS () const |
| uint32_t | getFPS () const |
| uint64_t | getGameDuration () const |
| uint64_t | getTicks () const |
| uint32_t | getWidth () const |
| uint32_t | getHeight () const |
| uint32_t | getEpisode () const |
| uint32_t | getId () const |
| long | getTicksModifier () const |
| Unit * | getUnitByNameID (const std::string &nameID) |
| void | setMaxFPS (int fps_) |
| Set the Game FPS. More... | |
| void | setSelectedPlayer (Player &player) |
| Set selected player. More... | |
| Player & | addPlayer () |
| void | insertPlayer (Player &player) |
| void | tick () |
| Game Tick Function. More... | |
| virtual void | _update () |
| const cv::Mat & | render () |
| Game Render Function. More... | |
| virtual const cv::Mat & | _render () const |
| Game Render implementation. More... | |
| void | caption () |
| Print the Game Statistics. More... | |
| virtual void | _caption () const |
| void | start () |
| void | stop () |
| void | reset () |
| virtual void | _reset () |
| bool | isTerminal () |
| virtual void | _onUnitCreate (const Unit &unit) const |
| virtual void | _onUnitDestroy (const Unit &unit) const |
| virtual void | _onResourceGather (const Tile &tile, const Unit &unit) const |
| virtual void | _onResourceDepleted (const Tile &tile, const Unit &unit) const |
| virtual void | _onEpisodeStart () const |
| virtual void | _onEpisodeEnd () const |
| virtual void | _onTileChange (const Tile &) const |
| virtual void | _onUnitAttack (const Unit &unit) const |
Public Attributes | |
| std::array< Criteria::ScenarioCriteria::ScenarioContainer, 8 > | criteriaList |
Public Attributes inherited from Game | |
| std::unique_ptr< BaseGUI > | gui |
| GUI Pointer. More... | |
| const Config | config |
| Map | map |
| Const Map (Order 1) More... | |
| xt::xarray< double, xt::layout_type::row_major > | state |
| Game state (Order 2) More... | |
| Tilemap | tilemap |
| Game Tilemap (Order 3) More... | |
| StateManager | stateManager |
| Game State Manager. More... | |
| std::vector< Player > | players |
| List of Players inside the game session. More... | |
| std::vector< Unit > | units |
| List of Units inside the game session. More... | |
| std::unordered_map< std::string, Unit * > | unitsNameMap |
| uint32_t | id {} |
| Game Identification. More... | |
| uint64_t | ticks = 0 |
| Game Episode Ticks. More... | |
| uint32_t | episode = 1 |
| Game Episode. More... | |
| uint32_t | max_fps {} |
| Game Max FPS. More... | |
| uint32_t | currentFPS = 0 |
| Game Current FPS. More... | |
| bool | terminal = false |
| Game terminal flag. More... | |
| Player * | selectedPlayer {} |
| Selected player. More... | |
| const cv::Mat | renderPlaceholder |
| empty opencv container in case of no GUI More... | |
| using DeepRTS::Scenario::Scenario::ActionSequenceContainer = std::vector<std::tuple<Constants::Action, const std::string> > |
|
explicit |
| std::tuple< int, int, bool > DeepRTS::Scenario::Scenario::computeOptimalStrategy | ( | Player & | player | ) |
| bool DeepRTS::Scenario::Scenario::evaluate | ( | const Player & | player | ) |
| std::tuple< int, int, bool > DeepRTS::Scenario::Scenario::optimalPlayGameStep | ( | Player & | player | ) |
|
virtual |
Reimplemented in DeepRTS::Scenario::GoldCollectFifteen.
| int DeepRTS::Scenario::Scenario::reward | ( | const Player & | player | ) |
|
overridevirtual |
| std::array<Criteria::ScenarioCriteria::ScenarioContainer, 8> DeepRTS::Scenario::Scenario::criteriaList |