#ifndef __FIFO_CONTROLLER_HPP__
#define __FIFO_CONTROLLER_HPP__
#include "ale_controller.hpp"
namespace ale {
class FIFOController : public ALEController {
public:
FIFOController(OSystem* osystem, bool named_pipes = false);
virtual ~FIFOController();
virtual void run();
private:
void handshake(); void openNamedPipes();
bool isDone();
void sendData();
void readAction(Action& action_a, Action& action_b);
void sendScreen();
int stringScreenRLE(const ALEScreen& screen, char* buffer);
int stringScreenFull(const ALEScreen& screen, char* buffer);
void sendRAM();
void sendRL();
private:
bool m_named_pipes;
int m_max_num_frames; bool
m_run_length_encoding;
bool m_send_screen; bool m_send_ram; bool m_send_rl;
FILE* m_fout;
FILE* m_fin;
reward_t latest_reward; };
}
#endif