|
bool | UpdateScope (size_t new_scope, ScopeType type=ScopeType::BASIC) |
|
void | BypassScope (size_t scope) |
|
| Processor (const genome_t &in_genome) |
| Create a new AvidaGP seeding it with a genome. More...
|
|
| Processor () |
| Create a default AvidaGP (no genome sequence, default instruction set) More...
|
|
| Processor (Ptr< const inst_lib_t > inst_lib) |
| Create an AvidaGP with a specified instruction set (but no genome sequence) More...
|
|
| Processor (const inst_lib_t &inst_lib) |
|
| Processor (const Processor< HARDWARE > &)=default |
| Copy constructor. More...
|
|
| Processor (Processor< HARDWARE > &&)=default |
| Move constructor. More...
|
|
virtual | ~Processor () |
| Destructor. More...
|
|
bool | operator< (const this_t &other) const |
|
void | Reset () |
| Reset the entire CPU to a starting state, without a genome. More...
|
|
virtual void | ResetHardware () |
| Reset just the CPU hardware, but keep the genome and traits. More...
|
|
void | ResetIP () |
| Reset the instruction pointer to the beginning of the genome AND reset scope. More...
|
|
Ptr< const inst_lib_t > | GetInstLib () const |
|
inst_t | GetInst (size_t pos) const |
|
const genome_t & | GetGenome () const |
|
const size_t | GetSize () const |
|
double | GetReg (size_t id) const |
|
double | GetInput (int id) const |
|
const std::unordered_map< int, double > & | GetInputs () const |
|
size_t | GetNumInputs () const |
|
double | GetOutput (int id) const |
|
const std::unordered_map< int, double > & | GetOutputs () const |
|
size_t | GetNumOutputs () const |
|
const stack_t & | GetStack (size_t id) const |
|
int | GetFunStart (size_t id) const |
|
size_t | GetIP () const |
|
emp::vector< ScopeInfo > | GetScopeStack () const |
|
size_t | CurScope () const |
|
ScopeType | CurScopeType () const |
|
ScopeType | GetScopeType (size_t id) |
|
emp::vector< RegBackup > | GetRegStack () const |
|
emp::vector< size_t > | GetCallStack () const |
|
size_t | GetNumErrors () const |
|
double | GetTrait (size_t id) const |
|
const emp::vector< double > & | GetTraits () |
|
size_t | GetNumTraits () const |
|
void | SetInst (size_t pos, const inst_t &inst) |
|
void | SetInst (size_t pos, size_t id, size_t a0=0, size_t a1=0, size_t a2=0) |
|
void | SetGenome (const genome_t &g) |
|
void | SetReg (size_t id, double val) |
|
void | SetInput (int input_id, double value) |
|
void | SetInputs (const std::unordered_map< int, double > &vals) |
|
void | SetInputs (std::unordered_map< int, double > &&vals) |
|
void | SetOutput (int output_id, double value) |
|
void | SetOutputs (const std::unordered_map< int, double > &vals) |
|
void | SetOutputs (std::unordered_map< int, double > &&vals) |
|
double | PopStack (size_t id) |
|
void | PushStack (size_t id, double value) |
|
void | SetFunStart (size_t id, int value) |
|
void | SetIP (size_t pos) |
|
void | PushRegInfo (size_t scope_id, size_t reg_id) |
|
void | PushCallInfo (size_t pos) |
|
void | IncErrors () |
|
void | SetTrait (size_t id, double val) |
|
void | PushTrait (double val) |
|
inst_t | GetRandomInst (Random &rand) |
|
void | RandomizeInst (size_t pos, Random &rand) |
|
void | PushInst (size_t id, size_t a0=0, size_t a1=0, size_t a2=0) |
|
void | PushInst (const std::string &name, size_t a0=0, size_t a1=0, size_t a2=0) |
|
void | PushInst (const Instruction &inst) |
|
void | PushInst (Instruction &&inst) |
|
void | PushRandom (Random &rand, const size_t count=1) |
|
bool | Load (std::istream &input) |
|
void | ProcessInst (const inst_t &inst) |
| Process a specified instruction, provided by the caller. More...
|
|
size_t | InstScope (const inst_t &inst) const |
| Determine the scope associated with a particular instruction. More...
|
|
void | SingleProcess () |
| Process the NEXT instruction pointed to be the instruction pointer. More...
|
|
void | Process (size_t num_inst) |
| Process the next SERIES of instructions, directed by the instruction pointer. More...
|
|
void | PrintInst (const inst_t &inst, std::ostream &os=std::cout) const |
| Print out a single instruction, with its arguments. More...
|
|
void | PrintGenome (std::ostream &os=std::cout) const |
| Print out this program. More...
|
|
void | PrintGenome (const std::string &filename) const |
|
size_t | PredictNextInst () const |
| Figure out which instruction is going to actually be run next SingleProcess() More...
|
|
void | PrintState (std::ostream &os=std::cout) const |
| Print out the state of the virtual CPU. More...
|
|
void | Trace (size_t num_inst, std::ostream &os=std::cout) |
| Trace the instructions being exectured, with full CPU details. More...
|
|
void | Trace (size_t num_inst, const std::string &filename) |
|
|
static void | Inst_Inc (this_t &hw, const inst_t &inst) |
| Instructions. More...
|
|
static void | Inst_Dec (this_t &hw, const inst_t &inst) |
|
static void | Inst_Not (this_t &hw, const inst_t &inst) |
|
static void | Inst_SetReg (this_t &hw, const inst_t &inst) |
|
static void | Inst_Add (this_t &hw, const inst_t &inst) |
|
static void | Inst_Sub (this_t &hw, const inst_t &inst) |
|
static void | Inst_Mult (this_t &hw, const inst_t &inst) |
|
static void | Inst_Div (this_t &hw, const inst_t &inst) |
|
static void | Inst_Mod (this_t &hw, const inst_t &inst) |
|
static void | Inst_TestEqu (this_t &hw, const inst_t &inst) |
|
static void | Inst_TestNEqu (this_t &hw, const inst_t &inst) |
|
static void | Inst_TestLess (this_t &hw, const inst_t &inst) |
|
static void | Inst_If (this_t &hw, const inst_t &inst) |
|
static void | Inst_While (this_t &hw, const inst_t &inst) |
|
static void | Inst_Countdown (this_t &hw, const inst_t &inst) |
|
static void | Inst_Break (this_t &hw, const inst_t &inst) |
|
static void | Inst_Scope (this_t &hw, const inst_t &inst) |
|
static void | Inst_Define (this_t &hw, const inst_t &inst) |
|
static void | Inst_Call (this_t &hw, const inst_t &inst) |
|
static void | Inst_Push (this_t &hw, const inst_t &inst) |
|
static void | Inst_Pop (this_t &hw, const inst_t &inst) |
|
static void | Inst_Input (this_t &hw, const inst_t &inst) |
|
static void | Inst_Output (this_t &hw, const inst_t &inst) |
|
static void | Inst_CopyVal (this_t &hw, const inst_t &inst) |
|
static void | Inst_ScopeReg (this_t &hw, const inst_t &inst) |
|
static const inst_lib_t & | DefaultInstLib () |
| This static function can be used to access the generic AvidaGP instruction library. More...
|
|