create new folder Qlearning, first example rabbit game

This commit is contained in:
2024-04-29 00:01:32 +02:00
parent 62a98f3a9c
commit 77b9ead331
2 changed files with 38 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#ifndef __RABBIT_LEARN__H_C_
#define __RABBIT_LEARN__H_C_
#include "dimension_t/dimension_t.h"
#include "list_t/list_t.h"
struct game_params {
size_t num_episods;
dimension *dim;
size_t max_fox_number;
size_t max_block_number;
size_t max_carrot_number;
};
struct qlearning_params {
double learning_rate;
double discount_factor;
double exploration_factor;
};
struct cell {
long int rankPosition;
int state;
double *Q;
};
struct action {
int value;
int addMove;
};
struct states * create_states(dimension *dim);
void free_states(struct states *etat);
#endif /* __RABBIT_LEARN__H_C_ */