Q-learning-in-C/enviroment.h
snsd0805 c3a0335ff1
Merge: replace 'tic-tac-toe' with '4 in a row'
'tic-tac-toe' version is located on the other branch.
2023-06-02 23:48:55 +08:00

12 lines
360 B
C

struct action {
short player;
short loc;
};
void reset(short* board);
void show(short *board);
void get_available_actions(short *board, short *result, short *length);
short get_winner(short *board);
void state_hash(short *board, char *hash);
void act(short *board, struct action *a, char *state, float *reward, float *opponent_reward, short *winner);