Re: Run Tetris from RL-Library on Windows

39 views
Skip to first unread message

Brian Tanner

unread,
Nov 15, 2011, 10:48:12 AM11/15/11
to 李光亮, rl-li...@googlegroups.com
Hi there.

Running RL-Glue and its associated projects has never been super easy on Windows, but it can be made to work.

If you just need to work with Java projects then I believe you can run everything entirely on regular windows using an IDE like NetBeans or probably Eclipse.  Tetris has all the source files so you just need to accompanying libraries to run it.

RL-Library projects use RL-Glue, which has 4 components: RL-Glue, an Agent, an Environment, and an Experiment. If any of these that you are using are written in a language other than Java, you'll have to install Cygwin and install RL-Glue that way, because that method allows components from different languages to talk to each other over sockets.  All of the required info to get started should be here:

If everything is in Java, you can get off a bit easy, and run it as a Java program with the Java codec alone.

This example project shows how to do it:

Specifically, this file is a working example of an agent, environment, experiment all written in Java running together without sockets:

Once you have your head wrapped around how it all works it's not intensely complicated, but it is not easy to just explain how to get started over e-mail.  I suggest looking at some of the tutorials at http://library.rl-community.org for some extra step-by-step pointers.

If you have any specific questions please ask this list or rl-...@googlegroups.com and myself and others will endeavour to help.

--
Brian Tanner

Fire Plan Strategies:  We provide fire safety training, planning, signs, and supplies across Canada!

Our business grows by referrals. If you have any associates who may be interested in our services, we would appreciate your referral.

WHEN THE FIRE TRUCKS ROLL, IT'S TOO LATE TO PLAN!

On 2011-11-15, at 3:27 AM, 李光亮 wrote:

Dear Brian Tanner,

 

I am a phd candidate in University of Amsterdam, and am doing research of reinforcement learning about social behaviors. Right now I am planning to do some experiments on Tetris. So I download the Java-version of Tetris from RL-Library. Because the operating system of my computer is Windows,  would you mind telling me how can I compile and run the project on the Windows system?

 

Thank you for your patience. Looking forward to your reply!

 

Best regards,
Guangliang Li

Brian Tanner

unread,
Nov 15, 2011, 11:41:41 AM11/15/11
to 李光亮, rl-li...@googlegroups.com
Hi again.

Upon further reflection it's even easier than I thought on Windows.  You don't need to compile RL-Glue to use it, so if the components (agent, environment, experiment) are in a language other than C/C++ (Python, Java, LISP, Matlab) then you can just download the RL-Glue executable for Windows:

In that case the other components can be created in their own languages and run as separate process, talking to each other view the rl_glue.exe file.

--
Brian Tanner

Fire Plan Strategies:  We provide fire safety training, planning, signs, and supplies across Canada!

Our business grows by referrals. If you have any associates who may be interested in our services, we would appreciate your referral.

WHEN THE FIRE TRUCKS ROLL, IT'S TOO LATE TO PLAN!

On 2011-11-15, at 10:37 AM, 李光亮 wrote:

Dear Brian Tanner,
 
Many thanks for your detailed reply. I'll try it on my computer. If I have questions, I will let you know. Thank you again!
 
Best regards,
Guangliang Li

Brian Tanner

unread,
Nov 15, 2011, 12:09:50 PM11/15/11
to 李光亮, rl-li...@googlegroups.com
In that case you will have to install Cygwin and compile your experiment program against the RL-Glue libraries.  It's a hassle though.

Honestly, the experiment is really just a couple of loops and some data collection code most of the time.  It is usually the simplest component and the one that is not computationally constrained. It makes the most sense to use a language like Java or Python for the experiment program. If you are using agents and environments that are not in C/C++ I would recommend also using Java or Python for the experiment component.

PS: Are you working with Shimon Whiteson?

--
Brian Tanner

Fire Plan Strategies:  We provide fire safety training, planning, signs, and supplies across Canada!

Our business grows by referrals. If you have any associates who may be interested in our services, we would appreciate your referral.

WHEN THE FIRE TRUCKS ROLL, IT'S TOO LATE TO PLAN!

On 2011-11-15, at 11:04 AM, 李光亮 wrote:

Dear Brian Tanner,
 
If I'd like to do the experiment in the language of C++, then what can I do to run the project?
 
Best regards,
Guangliang Li

Reply all
Reply to author
Forward
0 new messages