2 // Written and (C) by Francois Fleuret
3 // Contact <francois.fleuret@idiap.ch> for comments & bug reports
9 #include "simple_window.h"
17 // A canonical name for the task, upper caps, digits and "_"
18 virtual const char *name() = 0;
19 // A task can be started with several degrees of difficulty
20 virtual int nb_degrees() = 0;
21 // Returns the size of the area
22 virtual int width() = 0;
23 virtual int height() = 0;
24 // Initializes the world (put polygons with Universe::add_polygon)
25 virtual void init(Universe *universe, int degree) = 0;
27 virtual void update(scalar_t dt, Universe *universe, Manipulator *manipulator) = 0;
28 // Computes and returns the reward (can be positive or negative)
29 virtual scalar_t reward(Universe *universe, Manipulator *manipulator) = 0;
30 // If we need to draw something
31 virtual void draw(SimpleWindow *window) = 0;
34 // Loads a shared object file
36 Task *load_task(const char *filename);