00001 #ifndef __GLOBAL_H__
00002 #define __GLOBAL_H__
00003
00004 #include <avr/io.h>
00005 #include <avr/interrupt.h>
00006 #include <math.h>
00007
00008 #include <stdlib.h>
00009
00010
00011
00012
00013
00014
00015
00019 #define F_CPU 11059200UL
00020 #include <avr/delay.h>
00021
00025 #define MAX_STATES 200
00026
00030
00031 #define DELAY_TIME 800L
00032
00036 #define UP 0x00
00037 #define DOWN 0x01
00038 #define LEFT 0x02
00039 #define RIGHT 0x03
00040 #define NONE 0x04
00041 #define NUM_ACTIONS 0x04
00042
00046 typedef struct State {
00047 float value;
00048
00049 char feedback_up;
00050 char feedback_down;
00051 char feedback_left;
00052 char feedback_right;
00053 } STATE;
00057 #define STATESIZE sizeof(State)
00058
00059
00063 #define EXPLORATION_EGREEDY 0
00064 #define EXPLORATION_VALUE_BASED 1
00065
00066 #endif
00067