Thanks Doug,

I've got something working thanks to your help.

I've now got another question, this time about randomness.

I would like to test various subsumption robots on a given task to see which is "best" (finds a light in the fewest number of steps). Various subsumption brains use randomness in various ways. But I had hoped that when I initialized initialized a brain (via its __init__ function), that if I put something like:

random.seed(foo)

where foo is an integer passed in and successfully parsed via Pyro's - a flag, that a run could be made to always use the same random decisions (and hence be repeatable).

The first to runs I had, setting the seed, found a light in 63 and then 64 steps. The traces are similar. But the 3rd time I ran this, it found a completely different way.

What does one need to do to properly seed a RNG so that a robot always takes the same path?

Thanks,

--b

p.s. It is really great to be able to play w/subsumption using Pyro; thanks!

On Mar 9, 2007, at 6:37 AM, Douglas S. Blank wrote:

Belinda,

I don't remember the details, but I know that pyrobot stores the string
argument to -a in gui.engine.args . You'll have to parse it, maybe
something like:

args = gui.engine.args.split(",")
for a in args:
    name, value = a.split.("=")

I forget how you get the gui object from a brain (I'm on the road right
now), but maybe that will give you a pointer. More later...

-Doug

On Thu, March 8, 2007 10:25 pm, belinda thom said:
Hi,

I asked this question a couple months ago, and didn't get an answer,
so I'm trying again.

Hw can one pass info into a world file from the command line?

For instance, if I try:

42 % pyrobot -a foo=test -s PyrobotSimulator -w BsWorld.py -r
PyrobotRobot60000 -b BraitenbergVehicle1.py &
[1] 5536

and then put an

import sys
print sys.argv

into my world file, and i see:

['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/pyrobot/plugins/simulators/PyrobotSimulator',
'5536', 'BsWorld.py']

which looses the info about foo=test that the -a argument passes to
something.

Thanks,

--b
_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users



--
Douglas S. Blank
Associate Professor, Bryn Mawr College
http://cs.brynmawr.edu/~dblank/
Office: 610 526 6501


_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users

Reply via email to