IAtari
Genetic algorithm generating AI capable to play Atari2600 games.
agent_worker.cpp File Reference

Handle the test of an agent. More...

#include <iostream>
#include <ale_interface.hpp>
#include "agent_worker.hpp"
#include "Utils.hpp"

Functions

message::result< double > agent_worker (message::request< agent > request)
 Test the given agent. More...
 

Detailed Description

Handle the test of an agent.

Function Documentation

◆ agent_worker()

agent_worker ( message::request< agent request)

Test the given agent.

First of all, the ALE is initialized. Then, the agent run until the game-over and that all the evaluation has been done.
In more detail, each frame the screen registers is re-computed and the agent choose and execute an action. Moreover, the reward is calculated and saved for each evaluation.

Parameters
requestThe agent to be tested.
Returns
The results (sum of rewards) acquired by this agent. There are as many results as evaluations.