Ejemplo n.º 1
0
        public void WumpusWorldAgentTest()
        {
            var path          = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), WUMPUS_WORLD_ANN_FILE);
            var neuralNetwork = Session.Instance.LoadNeuralNetwork(path);
            var environment   = new WumpusWorld(WumpusWorld.Boards.Board2);

            var agent = new WumpusWorldAgent(neuralNetwork);

            agent.Navigate(environment);
        }
Ejemplo n.º 2
0
        public void WumpusWorldTrainerTest()
        {
            var environment   = new WumpusWorld(WumpusWorld.Boards.Board2);
            var trainer       = new WumpusWorldTrainer(environment);
            var neuralNetwork = trainer.Train();

            var path    = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            var annFile = neuralNetwork.Save(WUMPUS_WORLD_ANN_FILE);

            annFile.WriteToDisk(path);
        }