Code Monkey home page Code Monkey logo

muzero-cartpole's Introduction

muzero-cartpole's People

Contributors

chiamp avatar

Stargazers

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

Watchers

 avatar

Forkers

dirichi

muzero-cartpole's Issues

ERROR

Dear Chiamp,

Thank you for sharing your effort with the community. I was trying your muZero code and I fixed some not updated issues relative to the use of the discontinued Monitor. Once I fixed those, I experienced this error

=========== TESTING ===========
Total reward: 9.0
C:\Users\Federico\AppData\Roaming\Python\Python310\site-packages\gym\wrappers\record_video.py:41: UserWarning: ←[33mWARN: Overwriting existing videos at D:\Dropbox\PROJECTS\MLTrading\muzero-cartpole\video folder (try specifying a different `video_folder` for the `RecordVideo` wrapper if this is not desired)←[0m
  logger.warn(
Total reward: 10.0
Total reward: 8.0
Total reward: 8.0
Total reward: 10.0
Total reward: 10.0
Total reward: 10.0
Total reward: 10.0
Total reward: 10.0
Total reward: 9.0

Iteration: 1    Total reward: 35.0      Time elapsed: 0.33502347469329835 minutes
Traceback (most recent call last):
  File "D:\Dropbox\PROJECTS\MLTrading\muzero-cartpole\main.py", line 301, in <module>
    self_play(network_model,config)
  File "D:\Dropbox\PROJECTS\MLTrading\muzero-cartpole\main.py", line 48, in self_play
    train(network_model,replay_buffer,optimizer,config)
  File "D:\Dropbox\PROJECTS\MLTrading\muzero-cartpole\main.py", line 184, in train
    loss += (1/num_unroll_steps) * ( mean_squared_error(true_reward,pred_reward) + mean_squared_error(true_value,pred_value) + binary_crossentropy(true_policy,pred_policy) ) # take the average loss among all unroll steps
  File "C:\Users\Federico\anaconda3\envs\mltrading_base\lib\site-packages\tensorflow\python\util\traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\Users\Federico\anaconda3\envs\mltrading_base\lib\site-packages\keras\losses.py", line 2176, in binary_crossentropy
    backend.binary_crossentropy(y_true, y_pred, from_logits=from_logits),
  File "C:\Users\Federico\anaconda3\envs\mltrading_base\lib\site-packages\keras\backend.py", line 5680, in binary_crossentropy
    return tf.nn.sigmoid_cross_entropy_with_logits(
ValueError: `logits` and `labels` must have the same shape, received ((1, 2) vs (2,)).

Did it happen to you too?

By the way is it possible to skip the rendering through any config parameter?

Thank you.

continous action space

Hey Chiamp,
how can i use this code to balance the continuous Single inverted pendulum environment with continuous action space? can you guide me little bit thanks.

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.