SoC 2012 HappyKsuh AI Recruitment

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

This proposal is under construction!


Kseniya Buraya - Refactoring AI Recruitment

The project is to improve current AI recruiting system. I will develop and implement these options:

  • To recruit with a lot of leaders instead of one
  • To consider the terrain type where the possible battle will be
  • To consider enemy and allied units together as to create great counter-unit mix
  • To provide the scenario editor an option to choose recruiting strategy ("defensive", "agressive", etc.) and to set limits on particular units


0 Per-leader recruit/recall lists Add to ai_default_recruitment_stage personal recruit/recall lists for each leader. none
1 Multiply leaders support Modify ai_default_recruitment_stage as to make it support recruiting with multiply leaders. Implementation requires to find a way to find a keep for each leader, probably bruteforcing would be effective. 0
2 Terrain analysis Add function to analyze_potential_recruit_terrain() similar to analyze_potential_recruit_combat() and analyze_potential_recruit_movements() none
3 Goals of potential recruits Find a way to store information about the goals of every recruit. Probably to store it in unit::role_ later. none
4 Limitation of recruitment Find a way to store information about the uppper limit of each type of units. none
5 Sensible counter-recruiting strategy Add function similar to get_combat_score, that will calculate scores based not only on enemy units but on own units too. Probably it'll take a lot of time to develop and test. 3
6 Different recruiting styles Develop and implement different recruiting styles (i.e. "defensive", "aggressive", "conserve resourses") and integrate it into the current recruiting system. none
7 Wait for enemy strategy Add functionality to AI to wait for player's units creation to run counter-recruiting strategy against them. Looks like while waiting AI will recruit in "scout mode". 5 6


Time Task Status
01.04 - 20.04 Get familiar with the code in /AI/default/. Develop and implement tasks 0 and 1 as preliminary example of my coding abilities.
24.04 - 06.05 Fix bugs and make improvements to tasks 0 and 1 if necessary. Develop analyze_potential_recruit_terrain() function and get familiar with necessary code.
07.05 - 13.05 Implement and test analyze_potential_recruit_terrain() function.
14.05 - 20.05 Get familiar with code in /AI/ and / like game.*, unit.* etc. Get tasks 0-2 totally completed.
21.05 - 03.06
(hard-studying period)
Develop task 3.
04.06 - 10.06 Make recruits to know their future goals. Testing and bugfixing.
11.06 - 01.07
(exams period)
Develop and implement upper limitation on recruiting every unit.
02.07 - 08.07 Think about counter-recruiting strategy, implement and test the prototype.
09.07 - 15.07
(mid-term deadline)
Based on prototype implement working realisation of counter-recruiting strategy. Have tasks 0-4 cleared.
16.07 - 22.07 Think of and document necessary styles of recruiting. Get a clear view how to integrate those styles into the recruiting process.
23.07 - 29.07 Implement the system of styles.
30.07 - 05.08 Develop and implement the "wait for" strategy. Looks simple in case of tasks 5-6 done.
06.08 - 12.08 Make necessary bugfixing and work on documentation.



SoC Application

Submitted to google


1) Basics

Name : Kseniya Buraya

Age : 18

E-mail : ksu.nyaka @ gmail . com

IRC : HappyKsuh

Country : Russia (UTC +4)

Education : SPb NRU IFMO, Computer Science, 1st year

I want to participate in GSoC because it provides an awesome opportunity of working in a huge project. Getting professional experience is the main goal for me for now. Getting in touch with the Open Source projects and community, getting the knowledge of how they work is also significant. And of course financial stimulation plays an important role.

2) Experience

I have no developing experience yet and as I'm a first year student I'm participating GSoC at the first time. The only significant thing is that I worked on translations of Battle for Wesnoth campaigns to the Russian during the Google Code In 2011, so I'm familiar with all the instruments necessary to get involved into the project.

Instead I got a lot of ACM experience while studying in high school that included some work on AI-based tasks. I think that AI is one of the most interesting spheres in nowadays IT, therefore I looked for AI-based projects in GSoC.

In reference to gaming experience - of course I'm a gamer. I prefer games that provide PvP experience like WoW or latest CoD, or games that just tell you a cool story like casual Machinarium or Half-Life series. For me the most significant part of game is the symbiosis of the story and gameplay, I hate those moments when after a thrilling story turn you have to watch stupid misses in AI-scripts or other gameplay issues that destroy all the delight of the moment.

I've played Wesnoth campaigns for a month during GCI 2011 and haven't participated in online battles.

3) Communication skills

I'm a native Russian speaker and I'm quite fluent in English. I'm feeling quite comfortable speaking in IRC. Usually it is not a problem for me to find common language with other people because I'm not afraid to ask questions and always answer if smb asks me.

I also feel comfortable with constructive criticism and advices given to me, because these are the only two things that experienced colleagues can give to me, so why to refuse? The same is right for me: for what do I have experience if I can't share it with smb?

Saying about developing - I'm surely will discuss the details of idea until I'll get the clear vision of how it'll work. For me getting the perfectly working code is much more important than coding smth that may be even unnecessary.

4) Project

I'm interested in AI Recruiting Algorithm. As I mentioned above, I had some experience in AI-algorithms and they looked very interesting to me, therefore I chose that project. I'm looking to get experience of AI-scripting and deepen my knowledge at that sphere. If the results of the project will be important for me, I'd stay in the project and continue work on AI improvements.

Unfortunately I have my exams during the mid of June, therefore I won't be very productive until that time. Instead I'll try to do some work till the end of May. This way the half of work should be done to the first mid-term deadline.

5) Practical considerations

I'm familiar with Java and C++ and ususally use MS VS (Windows) or Eclipse (Linux) as working IDE, or sometimes gedit if the project is simple and small.

STL, Boost, Sdl
familiar with STL and have a little experience in Boost
build environments
This page was last edited on 21 March 2013, at 03:20.