Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        BoardGame.setDebug(debug);
        game       = TicTacToe.Instance;
        crossAgent = new TicTacToeAgent(1);
        notAgent   = new TicTacToeAgent(-1);
        game.init(ForLearning, dim, 0, ComputerSymbol);
        brain = QLearning.Instance;
        brain.init(game, dim, epsilon, alpha, gamma);



        if (!ForLearning)
        {
            InitEventTriggers();

            //player.playTicTacToe(dim, NumEpisodes, epsilon, alpha, gamma);

            SetupTiles();

            game.StateMachine.Enable(BackgroundPlane, theTiles, notAgent, crossAgent, BrainType.Player, You);
            // FirstTime
            pubInstance.NotifyListeners("ResetGame");
        }
    }