Comments (8)
i am sorry, my code is wrong, this si more correct
import numpy as np
a = np.array([[1,2,3],[4,5,6]])
print a.shape
print a
b = np.stack(tuple(a for _ in range(4)), axis=2)
print b.shape
print b
c = np.array([[7,8,9], [10,11,12]])
print c.shape
print c
d = np.reshape(c, (2,3,1))
print d.shape
e = np.append(b[:,:,1:], d, axis=2)
print e.shape
print e
f = np.array([[13,14,15],[16,17,18]])
g = np.reshape(f, (2,3,1))
h = np.append(e[:,:,1:], g, axis=2)
print h.shape
print h
from pygameplayer.
Hi Flo, Sorry just to check it's OK in it's current form?(I very much hope so)
from pygameplayer.
hi @DanielSlater
sorry for stress. i hope it will also work with my code :)
from pygameplayer.
No problem, glad your finding it useful :) if you do find bugs, very happy for you to tell me so I can fix them.
from pygameplayer.
very useful, thanks alot
i dont think so, but if i find one, i will send issue to you
from pygameplayer.
hi @DanielSlater ,
i just wanna ask, how do you extract the data from self._observations ? you do it on line 152 https://github.com/DanielSlater/PyGamePlayer/blob/master/examples/deep_q_pong_player.py#L152
but when i try to do it the same way like you, i get the error:
TypeError: tuple indices must be integers, not list
i searched alot on web but cannot find anything that helps me, perhaps you could help me
my line of code is here, line 317
https://github.com/flobotics/flobotics_tensorflow_controller/blob/master/nodes/listener.py#L317
from pygameplayer.
Hi @flobotics
So the problem you have here is that in your code the line
OBS_LAST_STATE_INDEX = range(5)
Give you a tuple, contrast that with the line in PyGamePlayer
OBS_LAST_STATE_INDEX, OBS_ACTION_INDEX, OBS_REWARD_INDEX, OBS_CURRENT_STATE_INDEX, OBS_TERMINAL_INDEX = range(5)
In PyGamePlayer because of python unpacking OBS_LAST_STATE_INDEX will be an int. In your version it will be a tuple(the number 1 through 5).
Hope this helps
from pygameplayer.
aaahh, got it, after days :) thank you
from pygameplayer.
Related Issues (10)
- Need to be able to deal with pygame.time.set_timer
- Make it playable against a human controller.
- Stopping and Resuming Training
- The logic principle of this code
- Control and speed up pygame frame rate HOT 3
- Need license HOT 1
- usage problem HOT 7
- set values to 0. or 1. HOT 1
- Strange bug, moving from DOWN to UP HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygameplayer.