cosmoharrigan / rl-glue

Automatically exported from code.google.com/p/rl-glue
0 stars 0 forks source link

Errors in Python RL_set_state and RL_set_random_key #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to call RL_set_state or RL_set_random_key from Python
2.
3.

What is the expected output? What do you see instead?
I see the error:
  File "/export/home/tools/rl-glue/RL-Glue/Python/rlglue/RLGlue.py", line
169, in RL_set_state
    network.putInt(Network.sizeOf(sk))
AttributeError: 'module' object has no attribute 'sizeOf'

What version of the product are you using? On what operating system?
2.1.5, Linux

Please provide any additional information below.

It looks like sizeOf on line 169 of RLGlue.py should be sizeOfStateKey and
similarly on line 178 should be sizeOfRandomSeed

Original issue reported on code.google.com by michael....@gmail.com on 19 Dec 2007 at 7:57

GoogleCodeExporter commented 9 years ago
This bug has now been fixed.

Original comment by markp...@gmail.com on 20 Dec 2007 at 12:02

GoogleCodeExporter commented 9 years ago
Sorry I wasn't explicit when I posted the original message, this is still not 
fixed
in 2.1.6.

The changes made in 2.1.6 don't fix the problem since the existing 
sizeOfStateKey and
sizeOfRandomSeed are instance methods so 2.1.6 now gives the error:

 line 21, in <module>
    RLGlue.RL_set_state(init_state)
  File "/export/home/tools/rl-glue/RL-Glue/Python/rlglue/RLGlue.py", line 169, in
RL_set_state
    network.putInt(Network.sizeOfStateKey(sk))
AttributeError: 'module' object has no attribute 'sizeOfStateKey'

I made this work by using

network.putInt(network.sizeOfRandomSeed(rsk))

instead of the 2.1.6 code

network.putInt(Network.sizeOfRandomSeed(rsk))

Original comment by michael....@gmail.com on 14 Jan 2008 at 4:46