Account Options

  1. Sign in
Google Groups Home
« Groups Home
Please Help me get Started!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Bahamon  
View profile  
 More options Aug 7 2009, 12:10 am
From: Daniel Bahamon <danbaha...@gmail.com>
Date: Thu, 6 Aug 2009 21:10:21 -0700 (PDT)
Local: Fri, Aug 7 2009 12:10 am
Subject: Please Help me get Started!
Hello, first of all, thanks for this contest, I think it is a great
idea and hopefully we can come up with a nice AI algorithm for mario,

Unfortunatelly I have zero knowledge of Java, so I have no idea what
to do, I downloaded eclipse, but I don't see a file to open or
anything...

Fortunatelly I program in C++ and C# so it shouldn't be hard to learn
java, but could anyone please help me doing the following...

1) Setting up the project so that I can compile it.

2) showing me how I could play the game and perhaps look at some of
the basic AI's.

Thanks for the help in advance,

Good Luck to everyone!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jesse  
View profile  
 More options Aug 7 2009, 12:27 am
From: Jesse <jesf...@gmail.com>
Date: Thu, 6 Aug 2009 21:27:54 -0700 (PDT)
Local: Fri, Aug 7 2009 12:27 am
Subject: Re: Please Help me get Started!
Ok, I'll go step by step up to setting up to compilation. You must
have a JDK to do this so I'm just going to assume you have one. First
open eclipse and pick a workspace. This can be any empty folder. Then
right click on the package explorer work area and create a new
project, or alternatively create a new project using the pull down
menus. Name it whatever.

Next using right clicking or the pull down menus find the import
option. A window comes up. Select Filesystem under general for the
import type. Find the src file from the marioai folder you downloaded
from the site here. Select the ch and wox folders and import them. Now
drag them into your src folder in your project if they aren't there by
default.

Next right click on your project in the package explorer area and
create a new folder. Name it Libs. Find the jdom.jar file in the
marioai folder and drag it or import it into this folder. I just drag
from the filesystem to the eclipse window and it works. Then right
click on that jdom.jar in eclipse and select "add to build path" under
build path in the right click menu.

Next under the src folder in the project exlorer find the Play.java
file under ch.idsia.scenarios. Right click it select "run as" -> "java
application" this will result in a window with lots of red text appear
showing errors. Now we get to the fun part of moving resources.

In your actual filesystem find your workspace and project folder. In
that find the bin folder. also find the img folder in the main
subfolder in marioai.

move all the items from the img folder into /bin/ch/idsia/mario/engine

There are like 5 other work around for this but they all involve
changing the code and quite frankly you just want it up and running. I
would suggest mirroring all those files in the src directory tree as
well. That is putting them all in,  /src/ch/idsia/mario/engine . If
you do do that then go to eclipse and select your project and press F5
to refresh the project with the filesystem. Then again Right click
Play.java->"run as"->"java application" and you are ready to go.

.. yeah its a lot, but I like eclipse a lot and this project wasn't
made to work with it easily.

To change command line arguments click on the arrow next to the play
button and select run configurations, there you can change the command
line arguments, which is necessary to select the class you want the
game to use for the AI to control mario

By default it uses a human ai. controls are left right down (don't
press up it causes an error last i checked) s is jump a is speed/
fireball

best of luck

On Aug 6, 9:10 pm, Daniel Bahamon <danbaha...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ferr  
View profile  
 More options Aug 7 2009, 12:33 am
From: ferr <ferr.m...@gmail.com>
Date: Thu, 6 Aug 2009 21:33:48 -0700 (PDT)
Local: Fri, Aug 7 2009 12:33 am
Subject: Re: Please Help me get Started!
I'm in the same situation, I'm a C++/C# programmer.  This is what I
did (after a couple of hours of screwing around):
- In Eclipse, go to File -> New -> Java Project
- Select the Create from Existing Project radio button and browse to
the root marioai directory
- If your setup is like mine, you will need to copy tiles.dat from the
src/ch/idsia/mario/engine/level/ folder to the src/ch/idsia/mario/
engine/ folder.  Different IDEs handle resources differently, I'm
assuming, and something gets loose in Eclipse versus what the original
devs used.

- You should now see a lot of tan-ish colored boxes with crosses in
the Package Explorer on the left.  These are similar to namespaces
in .Net, and if you drill down within them, you will see .java files,
which I guess are equivalent to .cs files.
- To get started with seeing pixels on your screen, go to the
ch.idsia.scenarios library on the package explorer, expand it.  Right
click on Play.java and select Run As -> Java Application.  This should
allow you to play Mario with human controls.
- The next thing you can do, for sake of just diving in, I guess, is
modify the Play.java file (double click Play.java to see the source),
and set the controller variable (the Agent type) to one of the pre-set
agent classes,
i.e.             controller = RegisterableAgent.load
("ch.idsia.ai.agents.ai.ForwardAgent");
            RegisterableAgent.registerAgent (controller);
Make sure you do this before the options.SetAgent(controller); line.
You should then be able to run Play.java with pretty dumb AI.  Feel
free to check out the ForwardAgent source under
ch.idsia.ai.agents.ai.ForwardAgent.java.

- After that, read through the rest of the source files.

On Aug 7, 12:10 am, Daniel Bahamon <danbaha...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Bahamon  
View profile  
 More options Aug 7 2009, 2:08 am
From: Daniel Bahamon <danbaha...@gmail.com>
Date: Thu, 6 Aug 2009 23:08:17 -0700 (PDT)
Local: Fri, Aug 7 2009 2:08 am
Subject: Re: Please Help me get Started!
Wow Jesse, Thank you very much, you really helped me a lot, it works
perfectly, and honestly I would have never been able to do half of the
steps by myself. Thank you very much, and by the way, your
instructions where perfect. anyways, I wish you good luck on the
project.

Thanks

-Daniel Bahamon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arthur  
View profile  
 More options Aug 8 2009, 10:02 am
From: Arthur <monco...@gmail.com>
Date: Sat, 8 Aug 2009 07:02:08 -0700 (PDT)
Local: Sat, Aug 8 2009 10:02 am
Subject: Re: Please Help me get Started!
Thanks Jesse for this explanation! Thanks to your help I have the
HumanKeyboardAgent and the ForwardAgent working.

However when I launch the java ch.idsia.scenarios.Evolve, I get a
NullPointerException at the very beginning.

In Evolve, a SimpleMLPAgent is created with
            Evolvable initial = new SimpleMLPAgent();

(This set initial.name=null)

And then calls:
            options.setAgent((Agent)initial);

This setAgent calls RegistrableAgent.getAgentByName() that has the
following code:
    public static Agent getAgentByName(String agentName)
    {
        // There is only one case possible;
        Agent ret = AgentsPool.agentsHashMap.get(agentName);
        if (ret == null)
            ret = AgentsPool.agentsHashMap.get(agentName.split(":")
[0]);
        return ret;
    }

In this piece of code, agentName and ret are = null.
This does not seems to be normal because calling agentName.split(":")
gives a NullPointerException.

I do not know a lot of Java, maybe I have a configuration problem, b/c
it does not seems to be possible at this point of the code to have an
agent name = null.

Any help would be very welcomed.

Thanks,
Arthur


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terlisimo  
View profile  
 More options Aug 9 2009, 1:28 pm
From: Terlisimo <vvrb...@gmail.com>
Date: Sun, 9 Aug 2009 10:28:22 -0700 (PDT)
Local: Sun, Aug 9 2009 1:28 pm
Subject: Re: Please Help me get Started!
In Evolve.java, the initial agent is hard-coded to SimpleMLPAgent.

The problem with SimpleMLPAgent() is that its name returns null
whereas it should return SimpleMLPAgent.

in SimpleMLPAgent.java find:
private String name;

and replace with:
private String name = "SimpleMLPAgent";

This will make this agent work.

To run some other agent, in Evolve.java find:
Evolvable initial = new SimpleMLPAgent();

..and replace with the agent of your choice. Command line arguments
should take care of this but something's broken, looking into it...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »