Beispiel #1
0
 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();
 }
        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;
            }
        }
Beispiel #3
0
 public Main()
 {
     InitializeComponent();
     inicijalizacijaPretrage();
     qTable = new QTable(LEARNING_RATE, GAMMA, EPSILON);
 }