vincentberaud / minecraft-reinforcement-learning Goto Github PK
View Code? Open in Web Editor NEWDeep Recurrent Q-Learning vs Deep Q Learning on a simple Partially Observable Markov Decision Process with Minecraft
Deep Recurrent Q-Learning vs Deep Q Learning on a simple Partially Observable Markov Decision Process with Minecraft
Hi,
I am attempting to replicate your code but am having issues with the Tensorflow dependecy, namely with Tensorflow 2.0, many attributes were removed such as ".reset_default_graph()" and ".Sessions()" so the following error is returned:
Traceback (most recent call last):
File "agent_visual.py", line 461, in
tf.reset_default_graph()
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'
The simple solution (found here: https://stackoverflow.com/questions/40782271/attributeerror-module-tensorflow-has-no-attribute-reset-default-graph) is to return Tensorflow to version 1.X.
However, this is causing more issues therefore wanted to confirm what version of Tensorflow was used for your work?
Alternatively, these attributes seem to have been replaced by tf.function but I am not familiar with Tensorflow enough to confirm this. Would this be suitable to update your work to Tensorflow 2.0 or have I missunderstood something?
https://www.tensorflow.org/tutorials/customization/performance
Thanks in advance
Phil
Hello ClementRomac, I hope you are fine and happy. The MinecraftBasic-v0 does not contain any mobs etc except the target-block. Please, how could you help us to add mobskilled, Damage dealt by the agent, and Damage taken by the agent in the XML file for MinecraftBasic-v0? We have almost succeeded but now we just needs to plot the results of these three features explained above in the form of a Graph. The graph that we got after training the model is pretty ordinary, we could not get the desired output, please if you would like to help us to get some fruitful graphs with good results so we may keep you as a co-author in our publications. Thanks and looking forward.
OR
if you have already plotted some graphs so please share with us if it could help us in any way. thanks again and looking forward if you would like to work with us in a team...
/home/adil/anaconda3/bin/python /home/adil/pycharm/pycharm-2017.2.4/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 45121 --file /home/adil/Downloads/Minecraft-Reinforcement-Learning-master/DRQN_vs_DQN_minecraft.py
pydev debugger: process 1374 is connecting
Connected to pydev debugger (build 172.4343.24)
/home/adil/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
[2019-03-30 21:14:24,557] Making new env: MinecraftBasic-v0
/home/adil/anaconda3/lib/python3.6/site-packages/minecraft_py-0.0.2-py3.6.egg/minecraft_py/Malmo/Minecraft
Traceback (most recent call last):
File "/home/adil/pycharm/pycharm-2017.2.4/helpers/pydev/pydevd.py", line 1599, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/adil/pycharm/pycharm-2017.2.4/helpers/pydev/pydevd.py", line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/adil/pycharm/pycharm-2017.2.4/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/adil/Downloads/Minecraft-Reinforcement-Learning-master/DRQN_vs_DQN_minecraft.py", line 50, in
skip_steps = 0) #Movements modified to a faster convergence
File "/home/adil/anaconda3/lib/python3.6/site-packages/gym_minecraft-0.0.2-py3.6.egg/gym_minecraft/envs/minecraft_env.py", line 114, in init
self.mc_process, port = minecraft_py.start()
File "/home/adil/anaconda3/lib/python3.6/site-packages/minecraft_py-0.0.2-py3.6.egg/minecraft_py/init.py", line 77, in start
raise EOFError("Minecraft process finished unexpectedly")
EOFError: Minecraft process finished unexpectedly
Backend Qt5Agg is interactive backend. Turning interactive mode on.
Following on from my previous issue, when I attempt to run the training episodes, once the agent goes past the "pre_train_steps", I am getting the following error:
This has been from simply replicating all steps given with the exact code copied from the notebook. The only small change I have made is to change the following parameters to test in reasonable time:
Is this a know issue or should I investigate further?
Thanks
Hello ClementRomac, I hope you are fine and happy. The MinecraftBasic-v0 does not contain any mobs etc except the target-block. Please, how could you help us to add mobskilled, Damage dealt by the agent, and Damage taken by the agent in the XML file for MinecraftBasic-v0? We have almost succeeded but now we just needs to plot the results of these three features explained above in the form of a Graph. The graph that we got after training the model is pretty ordinary, we could not get the desired output, please if you would like to help us to get some fruitful graphs with good results so we may keep you as a co-author in our publications. Thanks and looking forward.
OR
if you have already plotted some graphs so please share with us if it could help us in any way. thanks again and looking forward if you would like to work with us in a team...
Being as researchers, we thought to extend your this work further but we are facing an error after running your code on our GPU, could you please help us to overcome this error? we will be thankful to you. below is the output of your program with an error:
[2018-10-07 10:56:26,665] Making new env: MinecraftBasic-v0
2018-10-07 10:57:26.056640: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
#######################################
% Win : 0.2%
% Nothing : 0.0%
% Loss : 0.0%
Nb J before win: 79.0
/usr/local/lib/python3.5/dist-packages/numpy/core/fromnumeric.py:2909: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/usr/local/lib/python3.5/dist-packages/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Nb J before die: nan
Total Steps: 79
I: 0
Epsilon: 1
Process finished with exit code 135 (interrupted by signal 7: SIGEMT)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.