Soc2012 Teugon Refactor Recruitment Algorithm

From The Battle for Wesnoth Wiki


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

Paolo De Luca - Refactoring recruitment algorithm

Refactoring recruitment algorithm as stated in the proposed ideas. I think those points are quite enough yet. However I would consider to detail what I've intended for "recruit units that are more useful" for I suppose it's highly connected with the rest of AI playstyle. Different behaviour based on

  • current map;
  • AI mission objetives: chase, retire, kill specific units;
  • initial Time of Day;
  • distance from enemy;
  • allies (which will repeat the above points if it's an AI);
  • current and future gamestyle ( aggressive/defensive) MUST include the fact that AI have to switch between them;


Additional Details

I know there are lots of maps where the player have to work with AI allies.

As gamer I've seen the major times I have to play with AI allies, I can achieve victory only If I can protect it from it's own mistakes.

What I say applies to all games, this applies to Wesnoth in particular since campaigns often involve players to deal with AI allies.

Summing Up IMHO players should be able to ask modify allies AI behaviour without directly controll them.

This is kinda OT kinda not for it touch trasversally the whole AI behaviour.

IRC

Teugon

SoC Application

Submitted to google

Questionnaire

1) Basics

1.1) Write a small introduction to yourself.

I'm Paolo De Luca, 21 years old Computer Science student.

1.2) State your preferred email address.

teugon@gmail.com

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

  • IRC = "Teugon";
  • forum = "Teugon";

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

  • I want to gain as much professional experience as possible and this sounds like a good opportunity
  • I'm really annoied by my university approach to teaching. In Italy it always about theory less about pratic, real world stuff not even to think of..
  • I very interested in the whole game making life-cycle.
  • frankly talking: I think working within GSOC can worth something inside my Curriculum.

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

I'm currently in my third year of Computer Science studies at Alma Mater Studiorum (Bologna)

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

I'm from Italy and I'm actully living here soI should be able to join IRC from 10:00 AM to 00:00 AM GMT. I usually get up late for I go to sleep late.

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

I've not planned nor I'm gonna plan some any vacations but some break time to meet friends could be taken probably during weekend. however since I would like to graduate as soon as possible. My SURE Summer period is only august(from monday to sunday) month, for I could required all July. June is full. Semptember should be soso one since I could lessons/"unfortunate exams" or thesis could take it's time there.

2) Experience

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

I have experience programming with C, scheme, Objective-C (iOS), javascript, java. these languages I've dealt with

* -- Objective-C -- A mobile Application iOS 4+ complaint ( Actually under development)
* -- javascript -- Programming exercises
* -- javascript -- client's side ( for a server federation project)
* -- Scheme -- Programming execises (for the programming course)
* -- java -- Healthcare Management ( Actually under development, for Software Engeneering project)
* -- C -- The AmyKaya OS project ( not the whole one) 
* -- C -- A proxy mhttp complaint ( for a networking project) 
* -- C -- changed a part of the UI of XCModel software ( working with the xtools library)
* -- C -- Programming exercises in Linux.

Others languages I know are Python and Lua BUT I've never used them in any kind of complex work. I could mention Pascal too but imo I would nothing with it.

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

I have worked/am working in small groups of ( 3/4) on all my projects, so I think to know..

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?

I haven't participated in gsoc 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.

I'm not involved yet.

2.5) Gaming experience - Are you a gamer?

Who is not? :D

2.5.1) What type of gamer are you?

It depends on the kind of games and on the kind of oppenenets: against players I'll experiment different strategies (all based on the attack first tactic), against AI I'm usually using a full defense till I'm able to defeat him in one full blow attack, when possible.

2.5.2) What type of games?

Mostly RPGs and Strategies. The only kind I can't play are horror ones if the have enough graphics/sounds gameplay to be realistic.

2.5.3) What type of opponents do you prefer?

I usually like AI for players tend to be arrongant, selfish, lazy and, above all, rude. This is true both for experienced and newbies one. Indeed I've experienced these defects too, all of them. But very few person comes back to say: "hey, I'm sorry for before, I had a bad day. Can I repair/help somehow." or even the simple "I'm sorry, I was wrong". but the next point holds the another motivation.

2.5.4) Are you more interested in story or gameplay?

I really like both of them. Stories for when well made they are a pleasure to learn but also a world to meet. Gameplay for I would end up making games as a work or at least have the chance to make a game the way I want it.

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've done only 1 match 1vs1 against a human player and.. he smashed me, maybe I'll try again after collecting expertise however I've ended all the 2.8 standard campaign and also some others one.

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 S­­V­­N (during the evaluation period or earlier) please state so.

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.

As Computer Science student I'm used to read mostly english books, so I could say I'm good enough to read tecnical book, tutorial, guides, & Co. in English. problems I could have are about words I do not know yet. p.e heavy descriptions books like novels however. Even if so, I'm usually able to understand their meaning by the context or with a motherlanguage vocabulary. Listenting is ok if the other one is talking clearly not fast and there is not so much noise (I do not understand most of railway station announce or pharmaceutical spots even in my own language so I guess the problem isn't myself). Speaking could be a problem. But I've been in other countries (I would mention I was at FOSDEM's game-dev this year) and it seems to be good enough

3.2) What spoken languages are you fluent in?

just 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 can be both unsocialable, or everyones buddy. I just fear Arrogant peers: they can't be helped. They are always right.

3.4) Do you give constructive advice?

I always try to document myself when giving advices. I do not advice for something I do not know enough.

3.5) Do you receive advice well?

sometimes, but mostly they are useless criticism or completely out of topic.

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

I think I am.

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

Each developing approch isn't always good: You always have to choose and it's always a tradeof. this is like I would act in this case:

  1. document myself till I know which is the code to refactor. What depends on it.
  2. Which are the implicit assumption ( usually there always something not written) in that code.
  3. State an implementation of the algorithm. I need players here, badly too.
  4. What said above till now needs to get documented if it isn't done. Now experimenting can take place. test for new features will be written.
  5. At this point I should be friendly enough to start the surgery.
  6. test & play.
  7. bugfix.
  8. 8. if ( !deployable) goto 3.

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've choose Refactor recuitment algorithm.

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

I haven't

4.3) Why did you choose this project?

I preafear the total AI defense stuff for I feel like it's easier but I've been slow. However I like AI related stuff, so what's the matter! Preference is based on time: I prefear start and complete something rather than leave it up for someone else.

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".

Based on what I said in point 3.7. It would be like this:

  1. --> about [1 week + 2 days (buffer time)] --- highly variable, based on the existing documentation.
  2. --> [1 day + 1 day (buffer time)] code should be known here.
  3. --> [1 day + 0 (no buffer time)] presentation and discussion with players must be booked on point 1. and yet have been accomplished.
  4. --> [1 week + 2 days (buffer time)] this phase is high risk documentation is needed as roadmap to me and as explaination to future developers. tests will drive the implementation.
  5. --> [3 days + 2 days (buffer time)] if you know what to do you're fast
  6. --> [1 day + 0 (no buffer time)] harvesting bug
  7. --> [1 week] fixes can be hard, since it's my code I'm expecting half week.
  8. --> [???] I'm sure I won't make a one time injection of features for I'm thinking to use Extreme Programming.

Anyhow I can not state how much iteration. I also have the minus of the Language which I don't know and this could add the need of more time. I'm not scared about the language for every project I've been asked for in my university espected me to know the language yet. Obviously I did not but I'd be lying telling it is not a problem.

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

I do not know the actual implementation at all neither I know the C++ language, however I can try to summ up something with design pattern in the GSOC application

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

Knowledge, good expertise with C++ , and maybe some friend.

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

I'd like to support like a Graphic Artist but I do not actually own any skill which is need. I just know Inkscape and just a few things abouts GIMP, worse of all no drawing skill background. When I'll be able I'll close the topic "Hints for a newcomer in artworking" which has been open by me some month ago.

5) Practical considerations

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

Sub­­version (used for all commits)

Never used any versioning system yet on my projects. I've started experimenting git 1 month ago but I decided to stop.

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

No, but I know the OOP. I'm planning to learn C++ during April.

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

I've only heard about the Sdl. For the XCModel UI I've used a department library based on Xlib libraries.

Python (optional, mainly used for tools)

I know the language but never actually used.

build environments (eg cmake/scons)

No. I've used automake and autoconfig once but usually I've settled out makefiles manually.

WML (the wesnoth specific scenario language)

No

Lua (used in combination with WML to create scenarios)

I know the language, and I've read a book on it, but never actually used. AFAIK it's just a loose C.

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

I prefear gedit, or geany. Actually I'm using eclipse for the Software Engeneering project. I've used geany on the early stage when I had no or insufficient programming experience. After that I moved to gedit. It just follow the KISS principle. Someone says use eclipse it's professional, it's full of feature etc.. Ok but I did not need 'em always. Moreover Eclipse it's heavy and it's width it's full of feature, It would drain much more resource than I need for nothing, also I'm used to have whole screen width with code and few icons. So, just use the right tool for your task. I'm starting to use Eclipse for it's a non.said constrain of our project however it's said to be the best tool for coding with Java. Actually I've used a bit Aptana but just for javascript exercises.

5.3) What programming languages are you fluent in?

I'm strong on C.

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!

No problem with phone but I prefear skype. It's free. About phone's contact I'd like to email my mentor with it.

Something I want to add

There is something I would like to say by myself.
  • the following link will let you download the whole part I had to make for the networking project to work, there should be both english and italian comments around there, however what I'm shipping it for is to you my way to organize/write code. I remember you it's about C language. http://db.tt/RZj4P7cf

All the material inside the test/ directory is not mine.

  • I'll try to be on IRC during weekends from now on. Non-weekend time I can't assure anything.
  • If you think there is something I should start learning for this project, I'm all ears up.
  • I'll have to anticipate what's I've said up before about timeline and when start doing stuff in general. This becouse I had not seen the whole GSoC timeline until today (24 March). I'll make a more appropiate timeline in the SoC application.

This page was last edited on 21 March 2013, at 03:10.