Giter VIP home page Giter VIP logo

deep-qlearning-demo-csharp's People

Contributors

dubezoniner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

deep-qlearning-demo-csharp's Issues

During the learning I have a crash

This is the neural network:

int quantityShootingInputs = 8; int quantityShootingActions = 4; int networkShootingSize = quantityMovementInputs * temporalWindow + quantityMovementActions * temporalWindow + quantityMovementInputs; List<LayerDefinition> shootingLayers = new List<LayerDefinition>(); shootingLayers.Add(new LayerDefinition { type = "input", out_sx = 1, out_sy = 1, out_depth = networkShootingSize }); shootingLayers.Add(new LayerDefinition { type = "fc", num_neurons = 70, activation = "relu" }); shootingLayers.Add(new LayerDefinition { type = "fc", num_neurons = 70, activation = "relu" }); shootingLayers.Add(new LayerDefinition { type = "fc", num_neurons = 70, activation = "relu" }); shootingLayers.Add(new LayerDefinition { type = "regression", num_neurons = quantityShootingActions }); // training configuration TrainingOptions trainingOptions = new TrainingOptions(); trainingOptions.temporal_window = temporalWindow; trainingOptions.experience_size = 30000; trainingOptions.start_learn_threshold = 1000; trainingOptions.gamma = 0.7; trainingOptions.learning_steps_total = 100000; trainingOptions.learning_steps_burnin = 3000; trainingOptions.epsilon_min = 0.05; trainingOptions.epsilon_test_time = 0.00; trainingOptions.layer_defs = shootingLayers; trainingOptions.options = new Options { method = "adadelta", l2_decay = 0.001, batch_size = 10 }; neuralNetwork = new DeepQLearn(quantityInputs, quantityActions, trainingOptions);

and this is the error:

IndexOutOfRangeException: Array index is out of range. ConvnetSharp.FullyConnectedLayer.forward (ConvnetSharp.Volume V, Boolean is_training) (at Assets/Scripts/Player/NeuralEngines/BySensors/Layers/FullyConnectedLayer.cs:47) ConvnetSharp.Net.forward (ConvnetSharp.Volume V, Boolean is_training) (at Assets/Scripts/Player/NeuralEngines/BySensors/Utilities/Net.cs:130) DeepQLearning.DRLAgent.DeepQLearn.policy (System.Double[] s) (at Assets/Scripts/Player/NeuralEngines/BySensors/Q-Learning/DeepQLearn.cs:241) DeepQLearning.DRLAgent.DeepQLearn.backward (Double reward) (at Assets/Scripts/Player/NeuralEngines/BySensors/Q-Learning/DeepQLearn.cs:381) SensorAgent.Backward (Double reward) (at Assets/Scripts/Player/NeuralEngines/BySensors/SensorAgent.cs:79) NeuralBySensorPlayer.Update () (at Assets/Scripts/Player/NeuralBySensorPlayer.cs:115)

The crash there is when start the learning and if I decrease the temporal window at 1 it works!

Poor results

I trained the agent overnight on fast computer, resulted in these stats:
experience replay size: 30000
exploration epsilon: 0
age: 3662244
average Q-learning loss: 0.0158955232113
smooth-ish reward: 0.870696559286462

The result is the bot is spinning in place in the wall corner.
This is not working as it should.
Not sure if it's the bot of the DQN itself :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.