Пример #1
0
        public (int new_state, int reward, bool done) Step(int action)
        {
            MoveByIndex(action);
            int new_state = Matematica.Array2D_GetFlatIndex(game_matriz, pos_y, pos_x);

            var reward = rewards[pos_x, pos_y];

            totalReward += reward;

            var done = false;

            if (rewards_to_win <= totalReward)
            {
                done = true;
            }

            return(new_state, reward, done);
        }
Пример #2
0
 public int GameReset()
 {
     ReSet(border);
     return(Matematica.Array2D_GetFlatIndex(game_matriz, pos_y, pos_x));
 }