Skip to content

Class cowboys::GPAgent

ClassList > cowboys > GPAgent

Inherits the following classes: AgentBase

Public Functions

Type Name
GPAgent (size_t id, const std::string & name)
bool Initialize () override
This agent needs a specific set of actions to function.
size_t SelectAction (const cse491::WorldGrid & grid, const cse491::type_options_t & type_options, const cse491::item_map_t & item_map, const cse491::agent_map_t & agent_map) override
Choose the action to take a step in the appropriate direction.
~GPAgent () override

Protected Attributes

Type Name
size_t movementIndex = = 0
current move of the agent
const std::vector< std::string > predefinedMovement = = {
"down", "down", "down", "down", "right", "right", "up", "up",
"up", "up", "right", "right", "right", "right", "right", "right",
"right", "right", "right", "right", "right", "left", "left", "left"}

Public Functions Documentation

function GPAgent

inline cowboys::GPAgent::GPAgent (
    size_t id,
    const std::string & name
) 

function Initialize

This agent needs a specific set of actions to function.

inline bool cowboys::GPAgent::Initialize () override

Returns:

Success.

function SelectAction

inline size_t cowboys::GPAgent::SelectAction (
    const cse491::WorldGrid & grid,
    const cse491::type_options_t & type_options,
    const cse491::item_map_t & item_map,
    const cse491::agent_map_t & agent_map
) override

function ~GPAgent

cowboys::GPAgent::~GPAgent () override

Protected Attributes Documentation

variable movementIndex

size_t movementIndex;

variable predefinedMovement

const std::vector<std::string> predefinedMovement;

The documentation for this class was generated from the following file source/Agents/GP/GPAgent.hpp