Missing / wrong documentation

49 views
Skip to first unread message

Ulrich Petri

unread,
Aug 4, 2009, 1:24:32 PM8/4/09
to Mario Competition
Hi,

this looks like an interesting project. But it's just about unusable
due to the status of the "documentation" (i.e. the Getting started
page).

Basicly only

java ch.idsia.scenarios.Play ch.idsia.ai.agents.ai.ForwardAgent

and

java ch.idsia.scenarios.Play ch.idsia.ai.agents.ai.ForwardAgent

do exactly what the page says they are doing. Everything else just
opens a game with the keyboard controller or throws an exception.

Also missing is documentation on how to start a server to use with
other controllers (python, etc.)

I tried various "incantations" I could think of after skimming the
source but all of those resulted in either an empty frame and a choice
of NullPointerException or InstantiationException:

java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent
java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent -port 4242
java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent -server
java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent -server -
port 4242

java ch.idsia.scenarios.CustomRun ch.idsia.tools.tcp.ServerAgent
java ch.idsia.scenarios.CustomRun ch.idsia.tools.tcp.ServerAgent -port
4242
java ch.idsia.scenarios.CustomRun ch.idsia.tools.tcp.ServerAgent -
server

java ch.idsia.scenarios.CustomRun -port 4242
java ch.idsia.scenarios.CustomRun -server


So it would be nice to have a few pointers on how to use the _current_
version of the code in the marioai.zip file.

Gavin Aiken

unread,
Aug 4, 2009, 1:49:52 PM8/4/09
to mariocom...@googlegroups.com
I'd like to second this and even take it a step further.

The Zip file has svn artifacts, would it be possible to put the code in a Google Code Project? That would be amazing, we could all help each other out by submitting fixes and documentation to the environment and test framework. They would all naturally be moderated by the competition organizers so that there could be no cheating but this would make the competition on the whole much better.

It would also be in the apparent spirit of the project as more time would be spent engineering the AI than on working out how the framework itself works.

blah blah blah more valid points - you know it's true :)

The fact that I have to go check for updates is the worst though, if you update the file and I don't see it then I might have to do a bunch of refactoring. At least give read only access to an SVN repo so we can just sync everytime we code.

Happy to help on any level with this comp, it's going to be fun!

Gav

arcandor

unread,
Aug 4, 2009, 2:00:29 PM8/4/09
to Mario Competition
Aye, if someone could at the least post some instruction on how to get
the python code up and running that would be much appreciated.

Arc

RobinB

unread,
Aug 4, 2009, 6:21:38 PM8/4/09
to Mario Competition
There is already a Google Code project for this competition:
http://marioai.googlecode.com/
It was mentioned in an earlier mailinglist mail.

I managed to build a functional bot with it (just need more accurate
enemy locations, which i mentioned in a separate thread on the group).

hth,
Robin

On Aug 4, 6:49 pm, Gavin Aiken <gav.ai...@googlemail.com> wrote:
> I'd like to second this and even take it a step further.
>
> The Zip file has svn artifacts, would it be possible to put the code in a
> Google Code Project? That would be amazing, we could all help each other out
> by submitting fixes and documentation to the environment and test framework.
> They would all naturally be moderated by the competition organizers so that
> there could be no cheating but this would make the competition on the whole
> much better.
>
> It would also be in the apparent spirit of the project as more time would be
> spent engineering the AI than on working out how the framework itself works.
>
> blah blah blah more valid points - you know it's true :)
>
> The fact that I have to go check for updates is the worst though, if you
> update the file and I don't see it then I might have to do a bunch of
> refactoring. At least give read only access to an SVN repo so we can just
> sync everytime we code.
>
> Happy to help on any level with this comp, it's going to be fun!
>
> Gav
>

Julian Togelius

unread,
Aug 4, 2009, 7:30:06 PM8/4/09
to mariocom...@googlegroups.com
Hi Ulrich,

Yes, we are a bit short on documentation, and I'm sorry for that. It's
definitely in the making, but what's there should be enough to get you
started on writing your own agents, provided you are using Java or
some other language running on the JVM. (If you are interfacing via
TCP it's definitely a bit more shaky at the moment - I'll get to
that.)

However, all the commands that are listed on the Getting Started page
are tested and should work as advertised, with the possible exception
of ToolsConfigurator. What exceptions are you getting?

I would guess that you have a class path problem causing Wox to not
load. Do the problems persist if you redownload the code, avoid
recompiling anything and just start the program from the command line
(not an IDE)? If not, there's a problem with Wox being removed from
the classes directory or with the working directory of your IDE.

Julian

2009/8/4 Ulrich Petri <ma...@ulo.pe>:
--
Julian Togelius
Assistant professor
IT University of Copenhagen
Rued Langgaards Vej 7
2300 Copenhagen S
Denmark
jul...@togelius.com
http://julian.togelius.com
+46-705-192088

Julian Togelius

unread,
Aug 4, 2009, 7:35:18 PM8/4/09
to mariocom...@googlegroups.com
Hi Gavin,

You're both right and wrong. It's great to have many hands helping,
and as Robin pointed out there is an SVN containing the latest
development version (not guaranteed to work!) of the project at
http://marioai.googlecode.com/. However, this is a competition,
meaning that in the interest of fairness and ease of use for new
competitors it's important that we have a final say of what goes in to
the code base.

I think a sensible compromise is that while anyone can download the
code from the SVN (though remembering that the version posted on the
competition website is what counts for scoring), new and improved code
can be posted to this group so that Sergey and I can integrate it
after looking through it. You are very welcome to help out.

Julian

2009/8/4 Gavin Aiken <gav....@googlemail.com>:

Julian Togelius

unread,
Aug 4, 2009, 7:35:50 PM8/4/09
to mariocom...@googlegroups.com
Sergey, Do we have such instructions?

Julian

2009/8/4 arcandor <arca...@gmail.com>:
>
> Aye, if someone could at the least post some instruction on how to get
> the python code up and running that would be much appreciated.
>
> Arc
> >
>



Brian Smith

unread,
Aug 4, 2009, 10:21:37 PM8/4/09
to Mario Competition
I looked for documentation as well as tried to get ServerAgent to work
with no success.

On the "Getting Started" page it lists a possible command as 'java
ch.idsia.scenarios.Evolve', but the closest thing I could figure out
was 'java ch.idsia.scenarios.EvolveIncrementally'

Brian

On Aug 4, 4:35 pm, Julian Togelius <julian.togel...@gmail.com> wrote:
> Sergey, Do we have such instructions?
>
> Julian
>
> 2009/8/4 arcandor <arcan...@gmail.com>:

Bryan Rink

unread,
Aug 5, 2009, 2:09:56 AM8/5/09
to Mario Competition
It seems that some package name and class names may have changed and
this may be what is causing the exception. It certainly did for me.
The Getting Started page mentions ch.idsia.ai.SimpleMLPController,
which I'm assuming is now ch.idsia.ai.agents.ai.SimpleMLPAgent

On Aug 4, 6:30 pm, Julian Togelius <julian.togel...@gmail.com> wrote:
> Hi Ulrich,
>
> Yes, we are a bit short on documentation, and I'm sorry for that. It's
> definitely in the making, but what's there should be enough to get you
> started on writing your own agents, provided you are using Java or
> some other language running on the JVM. (If you are interfacing via
> TCP it's definitely a bit more shaky at the moment - I'll get to
> that.)
>
> However, all the commands that are listed on the Getting Started page
> are tested and should work as advertised, with the possible exception
> of ToolsConfigurator. What exceptions are you getting?
>
> I would guess that you have a class path problem causing Wox to not
> load. Do the problems persist if you redownload the code, avoid
> recompiling anything and just start the program from the command line
> (not an IDE)? If not, there's a problem with Wox being removed from
> the classes directory or with the working directory of your IDE.
>
> Julian
>
> 2009/8/4 Ulrich Petri <m...@ulo.pe>:

Daniel Barreto

unread,
Aug 5, 2009, 4:11:09 AM8/5/09
to Mario Competition
Hey! I just started to track the iPyMario branch from the googlegroup,
I've been trying to start a server for the python example
(ipymario.py) but I couldn't get around it either. Can anybody who's
working on that python controller help me get started? I know the TCP
interface is a little bit "experimental" or "shaky" right now but
there should be at least some kind of unofficial documentation
(example or something) for the people who wants to use python.

Bye

Gavin Aiken

unread,
Aug 5, 2009, 1:01:24 PM8/5/09
to mariocom...@googlegroups.com
Thanks Robin, must have missed that on the main site (Or just not done my homework!).

Up and running now.

Sergey Karakovskiy

unread,
Aug 11, 2009, 7:31:31 AM8/11/09
to mariocom...@googlegroups.com
Hi, 

Thank you for your questions.
just a few comments and direct answers, this would be in favor of updating the documentation as well.

On Aug 4, 2009, at 9:24 PM, Ulrich Petri wrote:


Hi,

this looks like an interesting project. But it's just about unusable
due to the status of the "documentation" (i.e. the Getting started
page).

Basicly only

java ch.idsia.scenarios.Play ch.idsia.ai.agents.ai.ForwardAgent

and

java ch.idsia.scenarios.Play ch.idsia.ai.agents.ai.ForwardAgent

do exactly what the page says they are doing. Everything else just
opens a game with the keyboard controller or throws an exception.

Also missing is documentation on how to start a server to use with
other controllers (python, etc.)

How to start server:
java java ch.idsia.scenarios.MainRun -server
I use this one
java java ch.idsia.scenarios.MainRun -server on -vaot on -vlx 1044 -vly 10
to have more sweet positioning and view.


I tried various "incantations" I could think of after skimming the
source but all of those resulted in either an empty frame and a choice
of NullPointerException or InstantiationException:

java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent
java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent -port 4242
java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent -server
java ch.idsia.scenarios.Play ch.idsia.tools.tcp.ServerAgent -server -
port 4242

java ch.idsia.scenarios.CustomRun ch.idsia.tools.tcp.ServerAgent
java ch.idsia.scenarios.CustomRun ch.idsia.tools.tcp.ServerAgent -port
4242
java ch.idsia.scenarios.CustomRun ch.idsia.tools.tcp.ServerAgent -
server

java ch.idsia.scenarios.CustomRun -port 4242
java ch.idsia.scenarios.CustomRun -server


So it would be nice to have a few pointers on how to use the _current_
version of the code in the marioai.zip file.


This works for the current marioai.zip, but it's also a good idea to update from the trunk since all fresh features are there before pushing the code onto main competition page.
How to run other predefined controllers?
java java ch.idsia.scenarios.MainRun -ag ScaredAgent
java java ch.idsia.scenarios.MainRun -ag ScaredSpeedyAgent

How to play with other options (levels, difficulties, etc)
Here you can find options list and example of usage.
for instance,
java java ch.idsia.scenarios.MainRun -ag ScaredAgent -ld 5 -lt 1 
will let you see how ScaredAgent is gonna play on a level with difficulty 5 and of type 1

If you want to play a particular level several time, you can run

java java ch.idsia.scenarios.MainRun -an 42 -ld 5 -lt 2
will let you play the underground level with difficulty 


There are also some cheats to make the controller creating process easier. 
Creatures
You can disable creatures by pausing the world during the game (by pressing 'p') or by setting the parameter -pw on.
FPS.
By pressing + or - during the play you may tweak the FPS during the game. You might set it to "infinity" in advance by using -maxFPS on parameter value:
java java ch.idsia.scenarios.MainRun -maxFPS on

all the parameters used in the code and their defaults you can find in file
utils/ParametersContainer.java

Also there is a set of tools, which is available by using toolsConfigurator (there you can manipulate the game process even more flexible and realtime). Some features of it might be a little bit outdated, but it would be easy to enable them for the current version by your request.

Play around and ask me more if would like to know about some feature you found or you might would like to have!

regards,
Sergey

Sergey Karakovskiy

unread,
Aug 11, 2009, 8:41:36 AM8/11/09
to mariocom...@googlegroups.com
How to run python code:

1. Start the server:
java ch.idsia.scenarios.MainRun -server 
2. Start client:
2.1 If  you have pybrain installed
python python/research/scripts/ipymario.py 
2.2 if you have not pybrain installed
python python/competition/ipymario.py 

in ipymario.py you will find some options used to run the agent and rewards obtained. Using command line options (all of them (except some evidencies) are available through TCP as well), you may tweak the levels as convenient and flexible as in Java. 
For more details have a look at file marioenvironment.py
    # Level settings
and # other settings

are available from ipymario.py through the task.env.<filedName> and might be tweaked from the main script.
on top of this parameters in the method MarioEnvironment.reset() the argstring is created, which is sent to the server and server behaves as it would be run as java MainRun <that received from tcp parameters>

Play around it and let me know I you encounter any troubles!

Cheers,
Sergey
--
Kind Regards
Sergey Karakovskiy



Sergey N

unread,
Aug 12, 2009, 12:48:53 AM8/12/09
to Mario Competition
How to stop the time? Timer option is not working.

>... -server on -fastTCP off -ld 9 -ls 1 -pw on -lt 2 -t off
Time is counting.

Sergey Karakovskiy

unread,
Aug 12, 2009, 6:41:27 AM8/12/09
to mariocom...@googlegroups.com
Hi, Sergey,

That was a bug, yes;
have a look at new jar;
code in svn is updated as well.

cheers,
Sergey

Sergey N

unread,
Aug 12, 2009, 7:45:23 AM8/12/09
to Mario Competition
Thanks.

On 12 авг, 16:41, Sergey Karakovskiy <sergey.karakovs...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages