Difference between revisions of "SoC2012 Tyrannodogg Make lua AI developement easier"

From The Battle for Wesnoth Wiki
(gna.org)
Line 21: Line 21:
 
tyrannodogg
 
tyrannodogg
  
In order to get familiar with the codebase i am working on the folnowing patch:
+
In order to get familiar with the codebase i am working on the following patch:
 
https://gna.org/patch/?3240
 
https://gna.org/patch/?3240
  

Revision as of 13:37, 6 April 2012


This page is related to Summer of Code 2012
See the list of Summer of Code 2012 Ideas



This is a Summer of Code 2012 student page



Description

Tyrannodogg - Make lua AI development and usage easier

At the moment the parts, which make a lua AI, are scattered around several WML Entities, resulting in a load of boilerplate code.

My approach is to shift more parts of the functionality into lua code, in a way that simple scripts can handle all steps necessary.

This includes wrapping the current default AI for lua usage.

I will also provide scripts for logging and further debugging.


IRC

Tyrannodogg,tyrannodogg

SoC Application

Submitted to google

gna.org

tyrannodogg

In order to get familiar with the codebase i am working on the following patch: https://gna.org/patch/?3240

Questionnaire

1) Basics

1.1) Write a small introduction to yourself.

Hi, my name is Tilo Fischer. I am a graduate student at Universität zu Lübeck, Germany.

1.2) State your preferred email address.

tyrannodogg /at/ googlemail /dot/ com

1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?

Tyrannodogg

1.4) Why do you want to participate in summer of code?

I was looking for a interesting project, to get involved before I finish my studies and start working. Honestly publicity and pay are a nice bonus.

1.5) What are you studying, subject, level and school?

I am studying computer science at Universität zu Lübeck and got my bachelor's degree last year. My areas of specialisation are robotics and software systems engineering.

1.6) What country are you from, at what time are you most likely to be able to join IRC?

I am from Germany. So I'll be online mostly between 20:00 and 24:00 CEST, respectively 18:00 to 22:00 UTC.

1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.

No other commitments are planned for now. Depending on the weather I may do a few weekend trips to the beach.


2) Experience

2.1) What programs/software have you worked on before?

My study included a few projects, each lasting for half a year:

  1. A skat game, implemented in Java including an AI, which I was in charge of
  2. Developing an AI for sailing robots
  3. Developing a moodle clone
  4. Developing a Runtime Verification Framework for Java using AspectJ to add events to the tested code

My bachelor thesis included modifying a remote control software for EPucks.

2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)

Except for my bachelor thesis the projects named above were handled in small teams.

2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?

No, I haven't participated yet.

2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.

Unfortunately not

2.5) Gaming experience - Are you a gamer?

Yes, I am.

2.5.1) What type of gamer are you?

I rarely play something unless my schedule allows it and I need some recreation.

2.5.2) What type of games?

RPGs, RTS and round based Strategy

2.5.3) What type of opponents do you prefer?

I like opponents, whose weakness has to be figured out and exploited in order to win. This mainly includes AI opponents and sometimes human ones.

2.5.4) Are you more interested in story or gameplay?

Gameplay is more important to me.

2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.

I occasionally played Wesnoth and quit due to a lack of time. I never got good enough to attempt a multiplayer game.

We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.

2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.

No I haven't.


3) Communication skills

3.1) Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.

English is my first foreign language. I learned it in school for 9 years and was in Australia for a student exchange. I seamlessly understand English, but my writing may contain a few grammatical errors.

3.2) What spoken languages are you fluent in?

German and English

3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.

I haven't done much of support yet or wesnoth online. Usually I stay calm even if I am insulted.

3.4) Do you give constructive advice?

This depends on whether I have a good understanding of the subject and the feedback I get.

3.5) Do you receive advice well?

I think so.

3.6) Are you good at sorting useful criticisms from useless ones?

At least I should be able to recognize obviously useless comments on my work.

3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project want

I like to discuss architectural decisions, which affect others, too. I want to avoid rendering related tasks impossible, gather suggestions and communicate the changes. On the other hand I can handle isolated tasks autonomously.


4) Project

4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?

I selected "AI: Make lua AI development and usage easier". Adding a debug framework seems to be an interesting task. But in order to implement it extending the luaai engine ( and make it easier to configure ) is necessary.

4.2) If you have invented your own project, please describe the project and the scope.

4.3) Why did you choose this project?

I am particularly interested in projects involving language design and the interaction of several languages. Lua is also my favorite programming language. So I think this project fits best to my experiences from past projects and my interests.

4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".

The first half of the time should be dedicated to reducing the boilerplate code and wrapping the RCA CAs into the lua engine. In the second part I will implement as much requested debugging features as possible.

4.5) Include as much technical detail about your implementation as you can

I plan either to implement the RCA main_loop in lua or to register the candidate actions automatically to it. Therefore it would be reasonable to wrap the RCA candidate actions into lua, so they can be imported, registered, used directly or indirectly or overwritten in lua with minimal effort. Since some other proposal also include this, it could be done in collaboration, but does not need to be done so. Meanwhile a survey could take place asking the AI developers what kind of debugging features they request.

To improve debugging capabilities a set functions to handle logging or to register callbacks could be predefined. In order to (de)activate these features the user can choose from different implementations at the beginning of his/her AI code by loading it. The most interesting callback would connect to another process, which then controls the AI to work stepwise and prints out the values of a variable. This step also seems to be the most difficult one and depends on the previous steps and other issues. Whether it is possible or not has to be evaluated during the process. Further steps include the handling of behavior candidate actions.

4.6) What do you expect to gain from this project?

I hope for an interesting task and getting in touch with the Open Source Community.

4.7) What would make you stay in the Wesnoth community after the conclusion of SOC?

If my project is considered useful and my schedule allows it, I will gladly come back and help with further development.


5) Practical considerations

5.1) Are you familiar with any of the following tools or languages?

  • Subversion (used for all commits)

SVN is the most common versioning system at my university.

  • C++ (language used for all the normal source code)

A few of the university projects not named above were written in C++

  • STL, Boost, Sdl (C++ libraries used by Wesnoth)

No, I never used this libraries directly.

  • Python (optional, mainly used for tools)

I use Python occasionally, but prefer to solve most problems in Lua

  • build environments (eg cmake/scons)

I have no problem compiling projects with cmake. For my projects I prefer to write makefiles or similar buildscripts directly.

  • WML (the wesnoth specific scenario language)

Not yet, but seems to be easy understandable, although it's quite extensive.

  • Lua (used in combination with WML to create scenarios)

I've been using Lua for 3 years for all kinds of prototypes.

5.2) Which tools do you normally use for development? Why do you use them?

I am a minimalist and feel most comfortly developing with Lua and vim, but depending on the scope and language of the project I add a few other tools. Eg. for Java projects I prefer Eclipse.

5.3) What programming languages are you fluent in?

Java, Lua, C, Shell-Script, LaTeX

also familiar with

C++, MATLAB ,SML ,Erlang, Python, AspectJ, Prolog

5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of "there is no way to contact you" does arise!

If I am accepted, I will add some more contact information.

In general, students should be as verbose as possible in their answers and feel free to elaborate.