<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lisu</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lisu"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Lisu"/>
	<updated>2026-05-05T11:36:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=25144</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=25144"/>
		<updated>2008-04-07T19:39:59Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Time Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now on I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basically my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extension I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like something which FormulaAI is today,  it makes movements depending on the situation data. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously function gets Dictionary of units and antiUnits as an optional parameter (but it may use its own built in). Extending this part to a framework that covers as many strategies as possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is the Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That is why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of an XML file (which is very easy to edit, even Eclipse have a visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that it is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= TimeLine =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. Analyze the code&lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides here I have to, like Google says, get to know with mentor, and code (most important).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes a few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice as much time as I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means that till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - it should be done before the end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait till the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break at my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money is worth good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am opened to any criticism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend the adaptation system (maybe to create a server with parameter files) because I am interested very much in this part of the work. I would love to improve it. I would also appreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I saw a good working committee. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I have worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I have started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I do not like Eclipse plugin for Python it is strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I have known it for about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I would not mind. It may be helpful. &lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24932</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24932"/>
		<updated>2008-03-30T18:37:21Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Practical considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now on I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basically my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extension I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like something which FormulaAI is today,  it makes movements depending on the situation data. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously function gets Dictionary of units and antiUnits as an optional parameter (but it may use its own built in). Extending this part to a framework that covers as many strategies as possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is the Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That is why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of an XML file (which is very easy to edit, even Eclipse have a visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that it is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides here I have to, like Google says, get to know with mentor, and code (most important).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes a few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice as much time as I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means that till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - it should be done before the end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait till the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break at my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money is worth good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am opened to any criticism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend the adaptation system (maybe to create a server with parameter files) because I am interested very much in this part of the work. I would love to improve it. I would also appreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I saw a good working committee. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I have worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I have started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I do not like Eclipse plugin for Python it is strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I have known it for about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I would not mind. It may be helpful. &lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24931</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24931"/>
		<updated>2008-03-30T18:32:53Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now on I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basically my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extension I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like something which FormulaAI is today,  it makes movements depending on the situation data. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously function gets Dictionary of units and antiUnits as an optional parameter (but it may use its own built in). Extending this part to a framework that covers as many strategies as possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is the Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That is why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of an XML file (which is very easy to edit, even Eclipse have a visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that it is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides here I have to, like Google says, get to know with mentor, and code (most important).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes a few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice as much time as I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means that till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - it should be done before the end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait till the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break at my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money is worth good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am opened to any criticism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend the adaptation system (maybe to create a server with parameter files) because I am interested very much in this part of the work. I would love to improve it. I would also appreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I saw a good working committee. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I have worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I have started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I do not like Eclipse plugin for Python it is strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I would not mind. It may be helpful. &lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24930</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24930"/>
		<updated>2008-03-30T18:29:04Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Time Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now on I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basically my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extension I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like something which FormulaAI is today,  it makes movements depending on the situation data. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously function gets Dictionary of units and antiUnits as an optional parameter (but it may use its own built in). Extending this part to a framework that covers as many strategies as possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is the Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That is why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of an XML file (which is very easy to edit, even Eclipse have a visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that it is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides here I have to, like Google says, get to know with mentor, and code (most important).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes a few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice as much time as I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means that till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - it should be done before the end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait till the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break at my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money is worth good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am opened to any criticism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend the adaptation system (maybe to create a server with parameter files) because I am interested very much in this part of the work. I would love to improve it. I would also appreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I have seen good working committe. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I have worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I have started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I do not like Eclipse plugin for Python it is strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I would not mind. It may be helpful. &lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24928</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24928"/>
		<updated>2008-03-30T18:12:14Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Idea Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now on I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basically my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extension I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like something which FormulaAI is today,  it makes movements depending on the situation data. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously function gets Dictionary of units and antiUnits as an optional parameter (but it may use its own built in). Extending this part to a framework that covers as many strategies as possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is the Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That is why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of an XML file (which is very easy to edit, even Eclipse have a visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that it is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice amount of time that I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend adaptation system (maybe create a server with parameter files, why is that? I am interested very much in this part of the work. I would love to improve it. I would also apreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I have seen good working committe. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I have worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I have started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I do not like Eclipse plugin for Python it is strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I would not mind. It may be helpful. &lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24926</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24926"/>
		<updated>2008-03-30T17:35:13Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Practical considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI is today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it is own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice amount of time that I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend adaptation system (maybe create a server with parameter files, why is that? I am interested very much in this part of the work. I would love to improve it. I would also apreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I have seen good working committe. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I have worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I have started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I do not like Eclipse plugin for Python it is strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I would not mind. It may be helpful. &lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24925</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24925"/>
		<updated>2008-03-30T17:34:00Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI is today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it is own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice amount of time that I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend adaptation system (maybe create a server with parameter files, why is that? I am interested very much in this part of the work. I would love to improve it. I would also apreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I am interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I have seen good working committe. I would like to be a part of it and I will do my best in what I am good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth...&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this sounds like it.&lt;br /&gt;
&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24924</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24924"/>
		<updated>2008-03-30T17:32:53Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Time Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI is today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it is own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I will need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I have got classes at my University at the same time, which includes few projects in this semester. It should not mainly interrupt my work for Wesnoth, but at this time I cannot sacrifice amount of time that I would like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I will start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I am oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I would like to extend adaptation system (maybe create a server with parameter files, why is that? I am interested very much in this part of the work. I would love to improve it. I would also apreciate if I could be maintainer of the AI part of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24923</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24923"/>
		<updated>2008-03-30T17:30:46Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Idea Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I will call StrategyAI level. As you can see on the picture , we have got C++ FormulaAI implementation, then we have Python scripting, now it is time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the &amp;quot;Situation Analysis Library&amp;quot; rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most important is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI is today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might be mixed in customizable way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it is own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it is planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. When AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it is time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I have mentioned before, that is easy to edit on one hand and very powerful on the other hand.&lt;br /&gt;
&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24922</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24922"/>
		<updated>2008-03-30T17:24:19Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Communication skills */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I have worked two summers in the UK, so I am available to speak let us say fluently in this language. It is obvously easier for me to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I do not have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I am trying to do so. Usually I attach arguments to my advice. It is always easier to think of a better solution of a problem when you can consider as many agruments as possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
I am doing my best to analyze my mistakes, and receive advices to make my work as good as possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it is hard task. I am trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24921</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24921"/>
		<updated>2008-03-30T17:15:43Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Gaming experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it is not the same, I have also tried FreeCiv) bring my memories. I have also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I have spent much time playing Heroes III multiplayer, or Civ IV. But I do not like RTS, because usually I am not that fast. I have also spent some time playing Wesnoth multiplayer, with some of my friends (I am still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it is not bad anyway considering the fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I think both is important to create a good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that it is a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I have not played much. I know this game for a few weeks, my friend told me about it. As I have mentioned before, I would rather prefer multiplayer campaigns, if there were more of them. Actually last few days I have played for 10-12 hours, which is not good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to do so. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24919</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24919"/>
		<updated>2008-03-30T17:09:57Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I am (or I was) leader of team preparing it. It was not a big project (7 participants, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I would prefer XP programming (recently I have programmed in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to do so. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24918</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24918"/>
		<updated>2008-03-30T17:08:23Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 participates, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time that I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I have written in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to do so. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24897</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24897"/>
		<updated>2008-03-30T12:56:35Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Communication skills */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 participates, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I have written in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to do so. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying not to be emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24895</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24895"/>
		<updated>2008-03-30T12:55:23Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Communication skills */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 participates, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I have written in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to do so. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying to be not to emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeIdeas&amp;diff=24893</id>
		<title>SummerOfCodeIdeas</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeIdeas&amp;diff=24893"/>
		<updated>2008-03-30T12:51:13Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Formula AI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a compilation of ideas from ML. Needs to be refined (more detailed description, deliverables, workload estimation?):&lt;br /&gt;
&lt;br /&gt;
== I want to be one of your Google Summer of Code students, what should I do... ==&lt;br /&gt;
&lt;br /&gt;
Here is a quick list of things to do to get you started&lt;br /&gt;
* Create an account on gna.org&lt;br /&gt;
* Create an account on the wesnoth forum&lt;br /&gt;
* Join the irc channel (#wesnoth-dev on irc.freenode.net) and introduce yourself. We will not give formal interviews, but we will clearly favor people we have learnt to know during the selection process&lt;br /&gt;
* Contact one of our SummerOfCode people (Ivanovic, Sirp, Boucman, Mordante) to have your forum nick marked as a Summer of code student&lt;br /&gt;
&lt;br /&gt;
* Start a wiki page about your idea, add a link on the bottom of this page and add this information on it:&lt;br /&gt;
** List your account names (gna, forum, irc nick) so that we can recognize you&lt;br /&gt;
** Fill the questionnaire on this page: [[SoC_Information_for_Google#Does_your_organization_have_an_application_template_you_would_like_to_see_students_use.3F_If_so.2C_please_provide_it_now.| List of questions to answer]]&lt;br /&gt;
** Detail your idea as much as possible, look at other students pages, and please give milestones and studies you've done&lt;br /&gt;
&lt;br /&gt;
* Though not mandatory, it is highly advisable to go to the [[EasyCoding]] and [[NotSoEasyCoding]] pages and implement one of these ideas (or any idea of similar scope) so we have an idea how you work. Be sure to use your gna account when submitting these patches so we know who it is coming from. You can also implement some features from our feature request database at gna. When you implement something, also list it on your own page with a reference to the patch.&lt;br /&gt;
&lt;br /&gt;
* For working on Wesnoth you have to be able to compile trunk. To do so you should have a look at the [[WesnothSVN|page about svn]] and afterwards [[CompilingWesnoth|compile Wesnoth svn]].&lt;br /&gt;
&lt;br /&gt;
* Once you have everything done here and think your idea is okay, go to [http://groups.google.com/group/google-summer-of-code-announce/web/guide-to-the-gsoc-web-app-for-student-applicants to page at google] to submit your application. You have to submit it before '''Monday, March 31, 2008''' or you have no chance to get in!&lt;br /&gt;
&lt;br /&gt;
== List of Ideas for the Project (Suggestions from the wesnoth developers) ==&lt;br /&gt;
&lt;br /&gt;
Here is only a short description of possible Ideas we have, each has a page of its own with a more detailed version on it.&lt;br /&gt;
&lt;br /&gt;
=== Writing an AI based on the formula AI ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth has always had a simple C++ based AI. David (our lead developer) has been working on a simple language to write AI in Wesnoth: [[FormulaAI]]&lt;br /&gt;
&lt;br /&gt;
The Wesnoth AI is used as an opponent in most campaigns, and as such is an important piece of code for the Wesnoth project. Unfortunately, because the skills required to understand and modify it are rather arcane, it is also one of the most neglected parts of the Wesnoth code. This is a place where a lot of research and useful work could be done. But keep in mind that [[WhyWritingAWesnothAIIsHard|writing an AI for Wesnoth is difficult]].&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas FormulaAI]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Extending the Multiplayer server ===&lt;br /&gt;
&lt;br /&gt;
Our multiplayer community is generally strong and healthy, but we believe its growth is limited by some problems in the interface of the multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Multiplayer server]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Scenario/Campaign editor ===&lt;br /&gt;
&lt;br /&gt;
Currently, in order to create campaign or multiplayer scenarios, it is necessary to manually edit WML files - XML-like configuration files. The goal of this project would be to create a graphical editor to make the creative process easier.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Scenario and Campaign Editor]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Addon server ===&lt;br /&gt;
Wesnoth has an addon server which offers users to upload user &lt;br /&gt;
made content (UMC). This allows all other users of Wesnoth&lt;br /&gt;
to easily download and install this content. The server was &lt;br /&gt;
originally written for user-made campaigns but contains a lot&lt;br /&gt;
more types of addons nowadays. Both the server side and the &lt;br /&gt;
client side need to be improved.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Addon Server]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Map editor ===&lt;br /&gt;
The map editor in Wesnoth serves two goals, making it easy to create&lt;br /&gt;
a new map and helping the terrain artists to test their new terrains.&lt;br /&gt;
&lt;br /&gt;
[[SoC_Ideas_Map_Editor]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Other possible ideas to be fleshed out ===&lt;br /&gt;
A MapGenerator rewrite - better scalable for outdoor maps, plus the possibility to define areas (similar to the caverns in the cave generator) etc.&lt;br /&gt;
&lt;br /&gt;
=== Make your own ideas ===&lt;br /&gt;
If you have your own idea the best thing is to join IRC wesnoth-dev at irc.freenode.net and discuss the idea with the developers there. If the developers think your idea is interesting and like the feature you can start to turn it into a full proposal. Once done discuss it again on IRC so the developers can accept your idea.&lt;br /&gt;
&lt;br /&gt;
== Information about our Project ==&lt;br /&gt;
The information we provided google with about our project can be looked up at the site [[SoC Information for Google]].&lt;br /&gt;
&lt;br /&gt;
Also see the [[DeveloperResources]] link (from the [[Project]] page).&lt;br /&gt;
&lt;br /&gt;
== People to bug on IRC ==&lt;br /&gt;
We have prepared a list of people with their &amp;quot;area of competence&amp;quot;. This is to give you an idea on which areas those people can be of help for you. Of course you should always just ask in the IRC chan, but those are the most likely ones to answer questions in the respective area. And here is the list:&lt;br /&gt;
&lt;br /&gt;
[[SoC People to bug on IRC]]&lt;br /&gt;
&lt;br /&gt;
== GSoC Student Applicant Ideas == &lt;br /&gt;
&lt;br /&gt;
Every student interested to work on Wesnoth as part of Summer of Code should create a page of his own where several things should be listed. Here is a short list of what should be mentioned on the list (the more info for us, the better...):&lt;br /&gt;
&lt;br /&gt;
* Who are you? Please list your IRC and forum nickname in here and describe yourself so that we get you to know.&lt;br /&gt;
* What do you want to work on? Please flesh out your personal ideas, so that we get to know what you plan to work on.&lt;br /&gt;
* If you already submitted patches, please list those so that we have a reference.&lt;br /&gt;
&lt;br /&gt;
===[[SoC Ideas FormulaAI|Formula AI]]===&lt;br /&gt;
====[[FormulaAIandAdaptation]] (Alesis-Novik) ====&lt;br /&gt;
The new idea and aproach using strategic and inside game knowledge&lt;br /&gt;
&lt;br /&gt;
==== [[FormulaAIandDynamicScripting]] (barbarianhero) ====&lt;br /&gt;
This project idea uses Formula AI and Dynamic Scripting to create a tunable and adaptive AI.&lt;br /&gt;
&lt;br /&gt;
====[[FormulaAIBaseAI]] (Dragonking) ====&lt;br /&gt;
Developing smart and pluggable AI, which would be really easy tweakable by Scenario and Campaign Developers &lt;br /&gt;
&lt;br /&gt;
====[[Building A Strategic Planner with Formula AI|FormulaAIPlanner]] (TVincent) ====&lt;br /&gt;
This project idea uses (and maybe extends) Formula AI to create a strategic, responsive AI of the Planner model.&lt;br /&gt;
&lt;br /&gt;
====[[FormulaAIAbstractLevel]] (lisu) ====&lt;br /&gt;
Developing easy to extend, smarter and adaptive AI.&lt;br /&gt;
&lt;br /&gt;
===[[SoC Ideas Multiplayer server|Multiplayer Server]]===&lt;br /&gt;
====[[ExtendingMultiplayerServer]] (dudegaurav) ====&lt;br /&gt;
This project proposal incorporates several ideas on how to refine the current Multiplayer Server !&lt;br /&gt;
====[[MultiplayerServerLobbyInterface]] (Xan) ====&lt;br /&gt;
Improving the Multiplayer Lobby, with an emphasis on simplicity, ease-of-use, and scalability&lt;br /&gt;
&lt;br /&gt;
===[[SoC Ideas Scenario and Campaign Editor|Scenario/Campaign Editor]]===&lt;br /&gt;
====[[ExtensibleScenarioEditor]] (david.hilton) ====&lt;br /&gt;
On a conceptual level, this idea combines a finite state machine editor with a code generator to create scenarios.&lt;br /&gt;
&lt;br /&gt;
====[[pyQTScenarioEditor]] (Malle) ====&lt;br /&gt;
That's me!&lt;br /&gt;
&lt;br /&gt;
====[[RujasuScenarioEditor]] (rujasu) ====&lt;br /&gt;
Scenario editor that will coordinate with the look and feel of the Wesnoth game.&lt;br /&gt;
&lt;br /&gt;
====[[CampaignEditor]] (jkiv) ====&lt;br /&gt;
&lt;br /&gt;
Click and drag! CLICK! AND! DRAG!&lt;br /&gt;
&lt;br /&gt;
====[[IntuitiveScenarioEditor]] (cjhopman) ====&lt;br /&gt;
An intuitive to use but still extensible Scenario Editor.&lt;br /&gt;
&lt;br /&gt;
====[[User:Elfy/SoC_Questionnaire#Description|New generation Map Editor (Elfy)]]====&lt;br /&gt;
Scenario+Map+Unit editor designed to cover all WML editing tasks&lt;br /&gt;
&lt;br /&gt;
===[[SoC Ideas Addon Server|Addon Server]]===&lt;br /&gt;
====[[AddonServerSocial]] (lao) ====&lt;br /&gt;
Improving addon Server/Client by adding some social content.&lt;br /&gt;
&lt;br /&gt;
====[[AddonServer]] (giebfried) ====&lt;br /&gt;
This project is to improve the server and client sides of the addon server, as suggested above.&lt;br /&gt;
&lt;br /&gt;
===[[SoC Ideas Map Editor|Map Editor]]===&lt;br /&gt;
====[[EvolutionaryMapEditor]] (xonev) ====&lt;br /&gt;
An evolutionary approach to improving the map editor.&lt;br /&gt;
&lt;br /&gt;
====[[VimzardMapEditor]] (vimzard) ====&lt;br /&gt;
A better random map generator, some essential features and a tie-in with the Scenario Editor.&lt;br /&gt;
&lt;br /&gt;
====[[NewMapEditor]] (Cecen) ====&lt;br /&gt;
This is basically a rewrite of the current map editor with various added features and tweaks to both increase the versatility of the editor and make it easier for the user to create maps with.&lt;br /&gt;
&lt;br /&gt;
====[[MapEditorRewrite]] (dlr365)====&lt;br /&gt;
A rewrite of the map editor, then taking it in the direction of a combined map/scenario editor for both quick scenarios and more complex ones.&lt;br /&gt;
&lt;br /&gt;
====[[Map Editor Ilor]] (ilor)====&lt;br /&gt;
A rewrite of the current editor with focus on clean code an maintainability, and ''then'' extra features&lt;br /&gt;
&lt;br /&gt;
===Map Generator===&lt;br /&gt;
====[[RandomCampaignGenerator]] (kartik thakore, refining idea) ====&lt;br /&gt;
Procedural map generation that will hope to give writers better control over the random map generator using an interface.&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
====[[WesnothStatistics]] (radx) ====&lt;br /&gt;
Project related to Wesnoth statistics (campaign) submission, gathering and presentation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code|*]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24892</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24892"/>
		<updated>2008-03-30T12:49:44Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 participates, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I have written in pair with my friend Jarek102, it creates better code, because we complement one another). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying to be not to emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24888</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24888"/>
		<updated>2008-03-30T12:45:34Z</updated>

		<summary type="html">&lt;p&gt;Lisu: /* Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 participates, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I write in pair with my friend Jarek102, it creates better code, because we are good in different things). We use unit tests.&lt;br /&gt;
&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying to be not to emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24882</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24882"/>
		<updated>2008-03-30T10:55:27Z</updated>

		<summary type="html">&lt;p&gt;Lisu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 persons, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I write in pair with my friend Jarek102, it creates better code, because we are good in different things). We use unit tests.&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I don't have a problem in interacting with other people.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying to be not to emotional in professional life.&lt;br /&gt;
&lt;br /&gt;
= Idea Description =&lt;br /&gt;
In my opinion most important thing now is to create one more abstract level over the FormulaAI which from now I'll call StrategyAI level. As you can see on the picture , we've got C++ FormulaAI implementation, then we have Python scripting, now it's time for the next level which could give every user the tool to modify AI to his needs (especially a campaign author). &lt;br /&gt;
Basicly my idea consists of three parts. I must add that I would like to extend existing FormulaAI, rather than replace it. &lt;br /&gt;
&lt;br /&gt;
*Situation Analysis&lt;br /&gt;
First extend I want to reach, is to create new set of tools responsible for good situation analysis. As you can see on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) Situation Analysis consists of some smaller parts, which actually ought to be functions included in the new library. Here we could apply some knowledge from pattern recognition (f. e. applies to map). What I want to achieve is the situation in which you use high level instructions from the Situation Analysis Library rather than any low level instructions to get the important information about current (and future) situation on the map. Separating this part from the main stream gives us some advantages like easier extendability, but most imporant is that (if good enough) it gives us chance to leave the low level instructions, so it makes building our high level of abstraction possible. &lt;br /&gt;
&lt;br /&gt;
*Decision Making&lt;br /&gt;
Next thing on the picture is Decision Making, this would be like what FormulaAI does today,  depending on situation data it makes moves. This is a part where you can still make a Python program which actually manages all AIs units. But here I would like to create another toolkit, which could create something like Strategy rule set, which consists of things like &lt;br /&gt;
** Overall (Offensive, Defensive) &lt;br /&gt;
** Objective (Protect(Unit, Place, Sth Different), Kill(Unit1,Unit2), HelpAlly(NumberOfAlly))&lt;br /&gt;
** Recruitment (UserDefined, AntiUnits, FastGrow)&lt;br /&gt;
** Units Formations (serried, fragmented)&lt;br /&gt;
which might me mixed in free way. For example Recruitment AntiUnits would be function which evaluating (using Sit. Analysis) what units have the opponents, and then Recruit anti Units. Obviously as a optional parameter function gets Dictionary of units and antiUnits (but it may use it's own built in). Extending this part to a framework that covers as many strategies as it is possible could make defining your own AI very easily, and hopefuly enough advanced. What is more, aim is to create system in which you can set for instance 30% AntiUnits 70% Fastgrow, which means depending on Situation Analisys, AI will use moves suggested from one scheme or another.&lt;br /&gt;
&lt;br /&gt;
* Adaptation Algorithm &lt;br /&gt;
Last but not least thing is Adaptation of an algorithm. For now it's planned to be based on very simple but succesful idea applied in neural networks. I mean, when we have some factors, which are defining our situation (from Sit. An. lib) we can assign weights (importance parameters) to them which we call parameters. Now when AI plays the match and loses using some strategy it means, that wrong factors were considered, so it changes parameters assigned to them and next time playing the game factors have different (more or less important) meaning. The disadvantage is, that there are two ways of achieving it, in one way we create central server with parameters for our artificial model, and then everyone who plays against it, connects to the server and upload his results, or is independent for every user, so everyone could train his AI himself and then share it to others, but it probably would take much time. That's why first idea is better, but harder in technicall implementation.&lt;br /&gt;
&lt;br /&gt;
Now it's time for StrategyAI level which simply uses first two of the tool sets, to create a new customizable strategy. In my basic Idea it could have a form of a XML file (which is very easy to edit, even Eclipse have an visual editor for XML trees, when you have specified dtd file, anyway I could write something like that). For instance XML file could look like that&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version = &amp;quot;1.0&amp;quot; encoding = &amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
         &amp;lt;!DOCTYPE StrategyAI SYSTEM &amp;quot;stratAI.dtd&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;OBJECTIVE KillAll=100/&amp;gt;&lt;br /&gt;
         &amp;lt;OVERALL Offensive=70 Deffensive=30/&amp;gt;&lt;br /&gt;
         &amp;lt;RECRUITMENT AntiUnits=100&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Mage&amp;gt;Tree&amp;lt;/Unit&amp;gt;&lt;br /&gt;
                     &amp;lt;Unit u=Dark Sorcerer&amp;gt;Drake Gladiator, Drake Slasher&amp;lt;/Unit&amp;gt;&lt;br /&gt;
         &amp;lt;UNITSFORMATION Serried=100&amp;gt;&lt;br /&gt;
                     &amp;lt;FirstLine&amp;gt;Drake Gladiator&amp;lt;/FirstLine&amp;gt;&lt;br /&gt;
                     &amp;lt;Back&amp;gt; Mage&amp;lt;/Back&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The advantage of the tree is you can simply express many situations using it. The advantage of XML format is, as I've mentioned before, that is easy to edit and mix up.&lt;br /&gt;
= Time Line =&lt;br /&gt;
&lt;br /&gt;
According to Google:&lt;br /&gt;
April 1 - April 14: Enjoying Wesnoth multiplayer and analyzing multiple AI strategies, try to make my own *.py AI, write 2 easy code and one not so easy code patches. &lt;br /&gt;
April 14 - May 26:  Community Bonding Period - Here I'll need to make some community research, get to know what are most popular strategies, examine division of Situation Analysis Part (or Decision Making as well). Besides, here I have to, like Google says get to know with mentor, and code (most importantly).&lt;br /&gt;
&lt;br /&gt;
May 26 - July 14: Students are coding for their GSoC projects. July 14 is also final date to submit mid-term evaluation.&lt;br /&gt;
&lt;br /&gt;
Mid-term Evaluation is one of the hardest things for me, just because I've got classes at my University at the same time, which includes few projects in this semester. It shouldn't mainly interrupt my work for Wesnoth, but at this time I can't sacrifice amount of time that I'd like to. I think 1-3 Days a week depending on week should be enough to achieve some basic goals which include:&lt;br /&gt;
* Basic functionality of Situation Analysis, which includes simple functions like map analysing or seeing opponents units (note, that this means till this time there will be also system to feedback results of analysis from first library to Decision Making part, something like communication protocol, but not in that sense) - should be done before end of June&lt;br /&gt;
* Upgrade some FormulaAI code, to fit my expectations (described on the picture ([http://img149.imageshack.us/my.php?image=formulaaiwesnothig4.jpg]) ). Most important here will be recruitment and forced moves (to fit the camaign authors) - start shortly after the bonding period (to analize the code) and then it will wait to the end of June, should be done before Mid - Term&lt;br /&gt;
* Plan interface of the Strategy AI - Made in the very begining of June (actually I'll start  shortly after first code analysis, and conversations with players)&lt;br /&gt;
&lt;br /&gt;
July 14 - August 18: There is a Summer break on my Univesity then, so I can be focused on SoC (which may include 40 hours of work a week, good money expects good and efficient work).&lt;br /&gt;
&lt;br /&gt;
Before final evaluation I would like to achieve all goals described in the previous part of this document. However, there might be some changes, please note, that the idea might change a little after mentors or players advices, I'm oppenned to any critisism that is needed to make good software.&lt;br /&gt;
&lt;br /&gt;
After SoC I'd like to extend adaptation system (maybe create a server with parameter files, why is that? I'm interested very much in this part of the work. I'd like to improve it. I'd also apreciate if I could be maintainer of the AI part of Wesnoth. &lt;br /&gt;
&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code]]&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24854</id>
		<title>FormulaAIAbstractLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FormulaAIAbstractLevel&amp;diff=24854"/>
		<updated>2008-03-29T21:03:47Z</updated>

		<summary type="html">&lt;p&gt;Lisu: New page: = Basics =  Write a small introduction to yourself. I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Comput...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Basics =&lt;br /&gt;
 Write a small introduction to yourself.&lt;br /&gt;
I'm Mateusz Lis, 3rd year student from Wroclaw University of Technology, Poland. I'm interested in everything what's connected to Computer Science. Recently I have spent much time on pattern recognition. &lt;br /&gt;
 State your preferred email address.&lt;br /&gt;
mateusz.lisATTgmail.com&lt;br /&gt;
 If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
lisu (sometimes on IRC lisu_)&lt;br /&gt;
 Why do you want to participate in summer of code?&lt;br /&gt;
I'd like to extend my programming experience, to finally involve in some big open source project. It would be also good if I invented good Artificial Inteligence for Wesnoth, it would be perfect if it could beat myself. I think that could be fun. &lt;br /&gt;
  What are you studying, subject, level and school? &lt;br /&gt;
3rd year of Computer Science, Wroclaw University of Technology, Poland.&lt;br /&gt;
= Experience =&lt;br /&gt;
  What programs/software have you worked on before?&lt;br /&gt;
Beyond some  small projects on my university I was the leader of programming group creating OCR system in Python (SnakeReader, available on code.google.com). Project is frozen now, because we had to face some problems connected to the efficiency of this language. I'm also a developer of commercial Content Management System (YaCMS). &lt;br /&gt;
  Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
In SnakeReader I'm (or I was) leader of team preparing it. It wasn't big project (7 persons, all from my univesrity).&lt;br /&gt;
In YaCMS I work with couple of my friends to create CMS for company.&lt;br /&gt;
  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?&lt;br /&gt;
It is my first time I apply to GSoC.&lt;br /&gt;
 What development model would you use (e.g. keywords: V-model, XP programming, agile programming, iterative; with the help of prototyping, formal specifications, tests, etc).&lt;br /&gt;
I'd prefer XP programming (recently I write in pair with my friend Jarek102, it creates better code, because we are good in different things). We use unit tests.&lt;br /&gt;
= Open Source =&lt;br /&gt;
 Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&lt;br /&gt;
Because works on SnakeReader are stopped I must say no (we are currenlty considering re-writing part in C).&lt;br /&gt;
= Gaming experience =&lt;br /&gt;
 Are you a gamer?  If so...&lt;br /&gt;
Ofcourse &lt;br /&gt;
 What type of gamer are you?&lt;br /&gt;
hmmm, fast?&lt;br /&gt;
 What type of games? &lt;br /&gt;
Actually I was playing more when I was younger. Titles like Heroes Of Might And Magic II and III, or Civilisation II (now I like IV, but it's not the same, I've also tried FreeCiv) bring my memories. I've also played much in C&amp;amp;C (Command &amp;amp; Conquer) Series, up to Red Alert II. So mainly Turn based strategies and RTS games.  &lt;br /&gt;
 What type of opponents do you prefer? &lt;br /&gt;
It depends, I've spent much time playing Heroes III multiplayer, or Civ IV. But I don't like RTS, because usually I'm not that fast. I've also spent some time playing Wesnoth multiplayer, with some of my friends (I'm still not the best) and I prefer it to single player games, because computer opponents are not the best ones. But I must say it not bad anyway considering fact, that in Heroes computer players always KNOW WHOLE MAP.&lt;br /&gt;
 Are you more interested in story or gameplay?&lt;br /&gt;
I thing both is important to create good game. I've played multiplayer campaign in Wesnoth but it has finnished after second mission. I think that's a good idea to develop. &lt;br /&gt;
 Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
I've not played much. I know this game from few weeks, my friend told me about it. As I've mentioned before, I'd rather prefer multiplayer campaigns, if there were more of them. Actually last few days I've played for 10-12 hours, which isn't good...&lt;br /&gt;
&lt;br /&gt;
= Communication skills =&lt;br /&gt;
 Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&lt;br /&gt;
I've worked two summers in the UK, so I'm available to speak let's say fluently in this language. It this obvously easier to write, however I make mistakes.&lt;br /&gt;
 Do you give constructive advice? &lt;br /&gt;
I'm trying to. Usually I attach arguments to my advices. It is always easier to think of a better solution of a problem when you can consider as many agruments as it is possible.&lt;br /&gt;
 Do you receive advice well? &lt;br /&gt;
Again, I'm doing my best to analyze my mistakes, and receive advices to make my work as good as it is possible &lt;br /&gt;
 Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
Usually justification makes the difference, although it's hard task. I'm trying to be not to emotional in professional life.&lt;br /&gt;
= Project =&lt;br /&gt;
 Did you select a project from our list? If that is the case, what project did you select?&lt;br /&gt;
FormulaAI extension.&lt;br /&gt;
 Why did you choose this project?&lt;br /&gt;
I'm interrested in Artificial Inteligence methods, and I know, that creating a game, especially this kind of game, can give me satisfaction. It is always easier to motivate myself, when I can see efects of my work. What is more convincing, when I had a better look on this project, I've seen good working committe. I would like to be a part of it and I'll do my best in what I'm good at.&lt;br /&gt;
** Include an estimated timeline for your work on the project&lt;br /&gt;
** Include as much technical detail about your implementation as you can&lt;br /&gt;
 What do you expect to gain from this project?&lt;br /&gt;
First of all I expect to gain new experience working in big project, being responsible for important part of it, and to achieve profficiency in playing Wesnoth ;).&lt;br /&gt;
 What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
Succes. I mean, I want to participate in big project, that motivates me to work. And this looks like it.&lt;br /&gt;
= Practical considerations=&lt;br /&gt;
 Are you familiar with any of the following tools?&lt;br /&gt;
*** Subversion I've worked with subversion from about two years.&lt;br /&gt;
*** C++ yes, from about two years I write programms in C++.&lt;br /&gt;
*** Python I've started with Python 3 years ago, and I must say I like this language.&lt;br /&gt;
 Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
Eclipse for C++, PHP and Java. Eric's Python Ide for Python (I don't like Eclipse plugin for Python it's strange).&lt;br /&gt;
 What programming languages are you fluent in?&lt;br /&gt;
*** Python (3 years)&lt;br /&gt;
*** C++ (2 years)&lt;br /&gt;
*** Java (last semester)&lt;br /&gt;
*** PHP (4 years)&lt;br /&gt;
*** Pascal (I know it from about ten years)&lt;br /&gt;
 What spoken languages are you fluent in?&lt;br /&gt;
English, Polish.&lt;br /&gt;
 At what hours are you awake (please specify in UTC)&lt;br /&gt;
10:00 AM - 1:00 PM&lt;br /&gt;
 Would you mind talking with your mentor on telephone / internet phone? &lt;br /&gt;
I wouldn't mind. It may be helpful.&lt;br /&gt;
* Detailed answer (optional, but writing skill is a good predictor of ability to work on a programming team, so you will improve your chances by responding to this).&lt;br /&gt;
** Write a small essay (750-1000 words or more) explaining why you want to participate in a Wesnoth GSoC project. You can use the above questions as guides, but feel free to throw in more information if you feel it is relevant.&lt;br /&gt;
** What is your perception of 'open source'? Briefly explain what you think of the whole 'open source' concept, how you discovered open source, what you expect to gain/experience by participating in an open-source project. (Answer separately or as part of above mini-essay)&lt;br /&gt;
** What motivates or inspires you to write programs and develop software?&lt;/div&gt;</summary>
		<author><name>Lisu</name></author>
		
	</entry>
</feed>