/* 
   Project: coevolutionary GP moto driving
   Dana Vrajitoru (and Russel Mehler)
   
   agent_steering.h

**/

#ifndef AGENT_STEERING_H
#define AGENT_STEERING_H

#include "agent.h"

class Agent_steering : public Agent {
 protected:

  Agent *slow, *fast;  

  // Status type of values to be taken from the manager.
  float hbar_angle, lpush, rpush;
  
  // Legacy value used for comparison with pervious update
  float old_diff;
  char last_lean;

  // Threshold of thhe speed bellow which we call the slow agent
  // (hbar) and above which we call the fast agent (lean).
  float slow_fast_thr;

  // Set the number of configuration values. To be defined by the
  // derivate classes.
  virtual void set_nr_config();


  // To be called if we find out who the boss is later.
  void set_manager(Manager *the_boss);

 public:
  // constructor
  Agent_steering();
  // Set the pilot manager.
  virtual void set_parent(Pilot_manager *pilot);
  // output the values
  virtual void output_data();
  // Agent-specific set data to be defined in the derivate class.
  virtual void set_data(float values[]);
  // This will be specific to each agent.
  virtual void update_action();
};

#endif
