SummerOfCodeProposal Velory

From The Battle for Wesnoth Wiki
Revision as of 00:07, 21 March 2013 by Esr (talk | contribs) (Hide historical instance of "Subversion" from mediawiki search to avoid false positives.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Personal Information/Introduction

Name: Burkay Özdemir

Age: 21


Education: 3 of 4 Year Degree, Computer Engineering

Wesnoth Forum ID: velory

IRC ID: Velory

GNA ID: velory

Email Address: veloryATundreamDOTnet , ghostprocATgmailDOTcom

AI Improvement Idea

I'd like to work with Formulas and functions in Formula AI, improve them and add new functions for simplifying,modularity and general use. Furthermore, I want to implement new types of evaluation for choosing candidate moves. Also i want to incorporate a debugger tool into Formula AI, and create primitive library for Formula AI.

'Adding Global Functions and variables to Formula AI and Improvement Formulas'

Squad Division Idea

'squad_leader' attribute: I want to implement squad_leader attribute to all units then we can check if the selected unit chose as squad_leader.(squad_leader can have two value 1 or 0)

'squad_number' attribute: This attribute will determine the unit's squad number.Every unit will belong to one squad and they will each have a number for controlling squads every turn in breaking squad formula.

'squad_size' attribute: This attribute will hold squad size which is determined with dynamical_partition_squads formula.

'squad_empty_slot' attribute: This attribute will contain value which is how many unit needed in squad.In squad idea Ai will divide units to squads -squad number will independent and will be selected by function- for example if ai side have only 3 men or 13 man maybe ai will break squads but write squad_empty_slot to 1 or 2,3 then if we recruit unit ai will check squads if squad_empty_slot 's value != 0 and if any squads found ai will add unit to this squad if ai cant find any squad which is have empty slot ai will give unit to squad_leader promotion and refer squad_empty_slot to squad_size-1.

'dynamically_partition_squads' formula: This formula will be called when starting every game.And will define squad number with looking enemy units and Ai units.This formula will choose which division will best for game with looking sum of units,starting locations etc. and decide how many unit will belong one squad.And this size will refer to squad_size.

'breaking squad.fai' formula: This formula will be called in every formula_ai turn.Formula will look unit's squad numbers.If a unit that hasnt got any squad Formula will look like squad_empty_slot[last_number_of_squad] if slot any empty slot there unit will be added this squad. If not formula will create new squad and give him squad_leader promotion.Also there can be some improvements like optimization of squad_leaders etc.

Follower Idea (Strategy)

I will implement a formula for squad following.This formula will get empty adjacent_locs (we can take hexes in his back which is distance_between(1 or 2 of them ) of leader and move near or back of his squad leader. If leader will attack some unit every unit in his squad will attack if they have enough movement point if not they will go his near or back again.(Also we can push queue structure to their movements and pop them but there is no need for that i think.)

Selection And Calculate Idea

'range()' function:Range function will allow us to do/trace/control something in given range.It will take 3 parameters like range(2,7,my_list) and return list[2],list[3],list[4],list[5]... in one list.

'specific_choose' function:Specific choose function will allow to choose specific items(unlike choose function we will not highest one,we will choose selected order).Function syntax will look like that

<result> = choose(<inputl list >,<number>,[<string>,]<formula>) its like choose function but we can choose order of item.E.g. if results from given formula are 80,60,50,40 we can choose any one of them.

'strong_enough' function: This function will calculate and return can we live one more turn with percentage value.In this function we will look how many unit we got and their levels etc. then we will look enemy_unit attributes so this function will calculate our poistion in game and return percantage value of how strong we are.(This function for improve and will simplfy recruitment decisions)

Candidate Moves,Attacks (Evaluation,Attack) Improvement

Decision State: I'm thinking about adding some new candidate move types for improve deciding state. I think move and attack is too limited types and choosing one of them might be ignore other type but choosing other might gooder then this one. So i think we need decision type for move or attack types. Or we can improve candidate move semantic&syntax to decide: type: evaluation: attack: then what if decide says to AI, AI may choose that evaluation type (movement or attack).Then with decision's help we can choose gooder type for example suppose that three of our units which need healing immediately are fighting with one enemy...So our healer can go and attack that unit first and after that other units can go near of healer and have their heal.So in this state first decision should choose attack type of evaluation instead of move(e.g.= move -> move near of units heal attack -> attacking unit in range).

General Formula AI Functions for Less Time Complexity

I want to create some general functions for decrease time complexity.This functions may be reachable from some filters and etc. But i saw that a lot of nested structure is increasing time complexity and Formula waiting too much for figure out.So i'm thinking about create some general functions like 'Encapsulate' or maybe 'distance_list_between' in my patches, cause we can get rid of waiting time with some handy functions in c++.

Debugging Purpose

Debugger Tool Idea: I want to create a debugger GUI for testing and debug purpose of formulas.This gui will carry two new textfield windows with using Wesnoth GUI ToolKit. That window will be open when we type ./wesnoth -t -d --debugger.After we open game with that command, a window with 2 text boxes and buttons below these textboxes will appear.We will read candidate move from .fai file and write to upper text box and highlight executing one.Then we will read cpp code -that which function is executing now- and write to downer textfield .Then we will stop game, start event loop and wait event handler's event. Reading cpp code will start from inner function and show variables values to us. Then we can scope all variables with that.(First im thinking about just showing highlighted code after that values). We have a Next line button,Run button,Stop button,Exit button. Nextline button will execute just one line and show values etc.,Run button will run game as normal and we can quickly scope which lines are executing. Stop button will stop game again and start to wait for event from event handler. Exit button will quit both window and game. I have a good knowledge about SDL events and SDL window i worked events in my internship(Flight Simulator) also i'm familiar fith gnu window.But i decide to use GUIToolkit after i talked with mordante.

I have also some recruitment function ideas and recruitment strategy. But i learned, in recruitment area Dragonking has really good knowledge and some serious work done by him last year. So i don't think i have a really good knowledge about that subject.So i think i'll be focus on my other approaches :) but i can give information about my ideas if anyone want to look at it.


+ Mar 14 - Mar 16 Meet up with Wesnoth developers Seek google SOC ideas and decide which idea will i choose for GsoC 2009.
+ Mar 17 - Mar 22 Familiarize myself with parts of current Wesnoth AI code,read some documents about Formula AI functions and writing your formula from Wesnoth Wiki, play Wesnoth more and learn How is ai working in situations.And implement a patch from easy coding page.
+ Mar 22 - Mar 23 Catch bugs in improvement and do some optimization.
+ Mar 24 - Mar 29 Implement a new patch from easy coding page and create some functions for general use and simplifying.
+ Mar 30 - Apr 3 Continue improvement patches for Formula AI , optimize Gsoc proposal and attain final proposal.
- Apr 4 - Apr 13 Implement “Selection idea” functions also other functions which is for general usage,simplifying and modularity.Midterms started... i may not be doing much between 5-10 Apr.
- Apr 14 - May 5 Start and Finish all functions and variables implementation about “Squad division” also “Follower idea” and write a formula for Squad division idea. Test and submit.
- May 6 - May 13 Catch bugs in Squad division and also other bugs in other implemented functions.And fix that bugs.
- June 8 - June 21 Finish all optimizations and Implement finished formulas to some game scenarios and test in scenarios.
- June 21 - July 10 Work with candidate evaluation (moves,attacking) idea especially Decision State. Implement decision idea to Candidate Moves and do some tests.
- July 10 - July 15 Catch bugs and do some optimizations about Decision idea
- July 16 - August 9 Work with Wesnoth GUIToolkit,Write a good debugger tool for Formula AI. Do some tests and fix some bugs with this tool.
- August 10 - August 16 “Pencils down” week. Write/improve documentations , clean codes and fix some bugs if any or write some tests. Start to other improvements.
- Afterwards Continue improve ai and develop game.


[Patch 1138]-I've implemented one of Formula AI improvements suggestions on the EasyCoding page-poisoning imrovement- and i wrote a scenario to test my improvement,under the guidance of boucman and with help of Dragonking.

[Patch 1145]-I've implemented one of Formula AI improvements suggestions on the Easy Coding page-healing improvement-

[Patch 1143]-I've implemented a new global function named distance_list_between which is allow us to take a list between one specific unit location and other specific -or all- units.But right after i finished this function boucman explained we can already take a list with for example map(my_units,distance_between(me.loc,loc))But submitted cause i think it might be worthy for general usage.

[Patch 1142]-I've implemented a new global function named Encapsulate which is comparing two list and return 1 if list1's all elements is also list2's elements.And return -1 if list1's all elements are not in list2.

Basics And Other Questions

Informal Introduction:

I am interested in GsoC and especially Wesnoth to improve my skills about Game Developing and also Open Source Developing.At the same time while improving myself i want to add somethings to game from myself and evolve this great game.


I am at the end of third of four year bachelor education in Computer Engineering. After these years i became experienced about some computer languages(C,C++,Java,Perl,Python,C#,SQL etc.). And i experienced both procedural design and Object Oriented Design(including UML Design).I'm in advanced level in both C C++ and Java languages.I'm also the chief of the game development group in my school. I have developed many projects for School and a little for some companies. When i was intern -last summer- i had developed a Flight Simulation for Defence Industry. I worked on Linux(ubuntu) to develop,i used C++,Open Gl and Sdl libraries,image generators (MPV,CIGI).I developed whole simulation myself with help of my intern mentor. About teamworking the most crowded project that I have ever worked, included four people. If I get accepted to this project, this will be my first time working with GSoC and the biggest open source project that i have ever worked on.

I'm a passionate gamer.My game genres of choices are Fantasy Role Playing games,MMORPGs,Real time Strategies,Simulations and Adventures. I'm playing Computer and Console games since i was 8 years old. First game that i played is Prehistoric. My priorities in games are about storyline and theme, not the graphics. So i believe that new generation games have huge problems about that.I'm playing Wesnoth about 2 week and i really enjoyed it reminded me Heroes III but Wesnoth's content is more flexible than Heroes and have gooder Theme. Game is harder then most turn based games and need to create good strategy for the win.

Communication skills:

My primary spoken/written language is Turkish.So english is my second language. But I have no problems interacting with others in a professional or social contacts.I could give and also receive constructive advices.


From the project ideas that I saw,I thought what I would like to participate in most will be "Write a primitive library for Formula AI". Im not too familiar with AI developing but its is in my interests. I'm trying to be familiar with formula AI about 1.5 week -playing game , looking to header files and class reference , read documentations about FAI on wiki , looking for forum threads etc. - So I choose this project because i know c++ well and i have also some real life experience on c++.Also i think i can learn quickly how AI is processing and i can develop new primitive library to AI.

About timeline; Generally my school ending at 2 p.m(GMT) and im usually awake to 12-1 a.m(GMT).At fridays my school ending at 10 a.m so i'm empty whole day after 10 a.m these days and off course i'm empty all weekends.(Turkey using GMT +3 on summer by the way).But i can both work and develop or research when i'm at school.Although i have exams at starting 25May and finishing at 7 June(And my school is ending at this day too). So in this two weeks i may not be doing much.On summer i have a internship but it will end at 4 p.m everyday(except Weekends-On weekends i can research and develop all day) and i can awake those days to 12-1 a.m too. So i can work much these hours(after and i can be online generally at 4 p.m on summer(at June-July).But i can develop when im at work(= before however it may not too much.Although my internship subject is Artifical Intelligence for Defense Systems. So this project might be similar (in many ways like designing ai algorithms etc.) and that intern might also give me some improvement ideas and optimizations. And would have no problem for me to talking over the phone, internet or otherwise.

Ps:If anyone have any doubt about How do i manage my time between internship and this project please contact me in mirc etc. So i can make him sure about how can i do..

I wish to participate in the Google Summer of Code and especially Wesnoth because i want to be a Game Developer and Summer of Code is my chance to do that.I'm trying to improve myself but i need a mentor and i need to do something that is worthy.In Turkey, Game Development is really weak issue so finding a good mentor and good community is really hard.And also i want to take place as a Open Source Developer cause my philosophy about Softwares correspond with Open Source philosophy. I believe that knowledge and information would be free, I want to stay as developer in Wesnoth after GSoC. So im looking to GSoC as chance to boost myself and the door to being in developer team in Wesnoth.

Practical considerations:

I am using Sub­­version(s­­v­­n).I'm good at C++ and writing about 2.5 years with C++ and i know Python about a year.And i'm using environments (eg cmake/autotools/scons) about 2 year. I am normally use Java and Python for development cause this languages have really good readability,reliability also they have good support for abstraction although they are really strong in their roles.And off course they are Open Source!!. I am using eclipse and qt4 in Linux(for java). When i'm writing c++ or python code on linux i generally use vim editor. On windows i'm using both visual studio and eclipse for developing.

Experienced Languages: C,C++,Java,Python,C#,Perl,PhP,Mysql,Javascript,Html,Xml,Action Script 3,(Cinema 4d this is not language but i used for design some 3d objects)

Experienced Libraries and components: Sdl,OpenGl,Directx,CiGi,Xna,pyGame,Boost Libraries

This page was last edited on 21 March 2013, at 00:07.