|
Thunderbots Project
|
#include <threaded_ai.h>


Public Member Functions | |
| ThreadedAi (const TbotsProto::AiConfig &ai_config) | |
| void | overridePlay (TbotsProto::Play play_proto) |
| void | overrideTactics (TbotsProto::AssignedTacticPlayControlParams assigned_tactic_play_control_params) |
Public Member Functions inherited from FirstInFirstOutThreadedObserver< World > | |
| FirstInFirstOutThreadedObserver (size_t buffer_size, bool log_buffer_full=true) | |
| std::optional< World > | getNextValue (const Duration &max_wait_time) final override |
Public Member Functions inherited from ThreadedObserver< T > | |
| ThreadedObserver (size_t buffer_size=Observer< T >::DEFAULT_BUFFER_SIZE, bool log_buffer_full=true) | |
| ThreadedObserver & | operator= (const ThreadedObserver &)=delete |
| ThreadedObserver (const ThreadedObserver &)=delete | |
Public Member Functions inherited from Observer< T, Clock > | |
| Observer (size_t buffer_size=DEFAULT_BUFFER_SIZE, bool log_buffer_full=true) | |
| virtual void | receiveValue (T val) |
| virtual double | getDataReceivedPerSecond () final |
Public Member Functions inherited from FirstInFirstOutThreadedObserver< TbotsProto::ThunderbotsConfig > | |
| FirstInFirstOutThreadedObserver (size_t buffer_size, bool log_buffer_full=true) | |
| std::optional< TbotsProto::ThunderbotsConfig > | getNextValue (const Duration &max_wait_time) final override |
Public Member Functions inherited from Subject< TbotsProto::PrimitiveSet > | |
| void | registerObserver (std::shared_ptr< Observer< TbotsProto::PrimitiveSet > > observer) |
Public Member Functions inherited from Subject< TbotsProto::PlayInfo > | |
| void | registerObserver (std::shared_ptr< Observer< TbotsProto::PlayInfo > > observer) |
Additional Inherited Members | |
Static Public Attributes inherited from Observer< T, Clock > | |
| static constexpr size_t | TIME_BUFFER_SIZE = 5 |
Protected Member Functions inherited from Observer< T, Clock > | |
| virtual std::optional< T > | popMostRecentlyReceivedValue (Duration max_wait_time) final |
| virtual std::optional< T > | popLeastRecentlyReceivedValue (Duration max_wait_time) final |
Protected Member Functions inherited from Subject< TbotsProto::PrimitiveSet > | |
| virtual void | sendValueToObservers (TbotsProto::PrimitiveSet val) final |
Protected Member Functions inherited from Subject< TbotsProto::PlayInfo > | |
| virtual void | sendValueToObservers (TbotsProto::PlayInfo val) final |
Static Protected Attributes inherited from Observer< T, Clock > | |
| static constexpr size_t | DEFAULT_BUFFER_SIZE = 1 |
This class wraps an AI object, performing all the work of receiving World objects, passing them to the AI, getting the primitives to send to the robots based on the World state, and sending them out.
|
explicit |
Constructs a new ThreadedAi object.
| tbots_proto | The AI configuration |
| void overridePlay | ( | TbotsProto::Play | play_proto | ) |
Override the AI play
| play_proto | The play proto to use to override |
| void overrideTactics | ( | TbotsProto::AssignedTacticPlayControlParams | assigned_tactic_play_control_params | ) |
Override Tactics
| assigned_tactic_play_control_params |