#include <agent.hpp>
|
enum | opcode {
OP_NOP,
OP_ADD,
OP_MINUS,
OP_MAX,
OP_MIN,
OP_UMINUS,
OP_MUL,
OP_DIV,
OP_LOG,
OP_EXP,
OP_COS,
OP_POPCOUNT,
OP_IF,
OP_SIZE
} |
|
using | instruction = uint64_t |
|
using | reg = double |
|
◆ instruction
◆ reg
◆ opcode
Enumerator |
---|
OP_NOP | |
OP_ADD | |
OP_MINUS | |
OP_MAX | |
OP_MIN | |
OP_UMINUS | |
OP_MUL | |
OP_DIV | |
OP_LOG | |
OP_EXP | |
OP_COS | |
OP_POPCOUNT | |
OP_IF | |
OP_SIZE | |
◆ agent() [1/2]
◆ agent() [2/2]
◆ begin_outputs()
auto agent::begin_outputs |
( |
| ) |
|
|
inline |
◆ end_outputs()
auto agent::end_outputs |
( |
| ) |
|
|
inline |
◆ execute_block()
bool agent::execute_block |
( |
const std::vector< unsigned char > & |
screen, |
|
|
int |
block |
|
) |
| |
◆ execute_instruction()
void agent::execute_instruction |
( |
const std::vector< unsigned char > & |
screen, |
|
|
int |
pc |
|
) |
| |
|
inline |
◆ get_action()
int agent::get_action |
( |
const std::vector< unsigned char > & |
screen | ) |
|
◆ print_block()
void agent::print_block |
( |
std::ostream & |
os, |
|
|
int |
block |
|
) |
| const |
◆ print_instruction()
void agent::print_instruction |
( |
std::ostream & |
os, |
|
|
instruction |
ins |
|
) |
| const |
◆ reg_to_string()
std::string agent::reg_to_string |
( |
int |
reg | ) |
const |
◆ reset_registers()
void agent::reset_registers |
( |
| ) |
|
◆ serialize()
template<typename Archive >
void agent::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
|
|
) |
| |
|
inline |
◆ sigmoid()
double agent::sigmoid |
( |
double |
x | ) |
const |
|
inline |
◆ params
◆ program
◆ registers
std::vector<reg> agent::registers |
The documentation for this struct was generated from the following files: