Thunderbots Project
Loading...
Searching...
No Matches
Ai Class Referencefinal

#include <ai.h>

Public Member Functions

 Ai (const TbotsProto::AiConfig &ai_config)
 
void overridePlay (std::unique_ptr< Play > play)
 
std::unique_ptr< TbotsProto::PrimitiveSet > getPrimitives (const WorldPtr &world_ptr)
 
TbotsProto::PlayInfo getPlayInfo () const
 
void overridePlayFromProto (TbotsProto::Play play_proto)
 
void updateAiConfig (TbotsProto::AiConfig &ai_config)
 

Detailed Description

This class wraps all our AI logic and decision making.

Constructor & Destructor Documentation

◆ Ai()

Ai ( const TbotsProto::AiConfig &  ai_config)
explicit

Create an AI with given configurations

Parameters
ai_config_The AI configuration

Member Function Documentation

◆ getPlayInfo()

TbotsProto::PlayInfo getPlayInfo ( ) const

Returns information about the currently running plays and tactics, including the name of the play, and which robots are running which tactics

Returns
information about the currently running plays and tactics

◆ getPrimitives()

std::unique_ptr< TbotsProto::PrimitiveSet > getPrimitives ( const WorldPtr &  world_ptr)

Calculates the Primitives that should be run by our Robots given the current state of the world.

Parameters
worldThe state of the World with which to make the decisions
Returns
the Primitives that should be run by our Robots given the current state of the world.

◆ overridePlay()

void overridePlay ( std::unique_ptr< Play play)

Overrides the play

Parameters
playplay to override with

◆ overridePlayFromProto()

void overridePlayFromProto ( TbotsProto::Play  play_proto)

Overrides the play from the play proto

Parameters
play_protothe play proto

◆ updateAiConfig()

void updateAiConfig ( TbotsProto::AiConfig &  ai_config)

Update the AiConfig proto

Parameters
ai_configThe new AiConfig proto

The documentation for this class was generated from the following files: