コード例 #1
0
ファイル: Main.cs プロジェクト: fantastic001/ai-lab
 private void btnLoad_Click(object sender, EventArgs e)
 {
     this.SuspendLayout();
     lavirint.ucitajLavirint();
     this.inicijalizacijaPretrage();
     qTable = new QTable(LEARNING_RATE, GAMMA, EPSILON);
     this.ResumeLayout(false);
     displayPanel1.Refresh();
 }
コード例 #2
0
        public void runEpisode(QTable qTable)
        {
            Node observation = Main.pocetniNode;

            while (true)
            {
                Action action          = qTable.chooseAction(observation);
                Node   nextObservation = observation.getPossibleActions()[action];

                paint(nextObservation);

                double reward = nextObservation.getReward();
                qTable.learn(observation, action, reward, nextObservation);

                if (nextObservation.isTerminalNode())
                {
                    break;
                }

                observation = nextObservation;
            }
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: fantastic001/ai-lab
 public Main()
 {
     InitializeComponent();
     inicijalizacijaPretrage();
     qTable = new QTable(LEARNING_RATE, GAMMA, EPSILON);
 }