<?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=Nephro</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=Nephro"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Nephro"/>
	<updated>2026-04-04T21:27:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51021</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51021"/>
		<updated>2013-05-13T08:49:31Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
A project to improve the existing AI developer toolset and implement a concurrent block for AI developers to be able to exploit the vast amounts of CPU time wasted during turns of other players.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
I learnt a lot of things during the last two summers while participating in GSoC for Wesnoth. I did a lot of analysis of the results of my work and discovered my strengths and weaknesses. I was thinking way too much about AI for the game in general while working mostly on tools to allow other developers make the computer play stronger strategically and tactically. &lt;br /&gt;
&lt;br /&gt;
My first year project was overly optimistic, I was not aware of the actual complexity and never even got to implementing it, since I was really behind on the mandatory tasks. Looking back to the project proposed by me in 2011 I can't say I am still excited about it in general, but it has a few very good points I would like to emphasize.&lt;br /&gt;
&lt;br /&gt;
There is no need to describe how difficult it is to create a strong AI player for a game like Wesnoth, capable of competing with experienced human players. While other GSoC ideas, like implementing a new recruitment algorithm or a defense strategy mechanism, will undoubtedly strenghten the AI, I want to propose an idea that can provide a completely new dimension for AI development for Wesnoth. I must also say that I only want to work and focus on the platform that will allow new possibilities for the AI, leaving the implementation of the actual AI algorithms to my free time and/or other developers that might now the strategic aspects of the game much better than me.&lt;br /&gt;
&lt;br /&gt;
=The concurrent block=&lt;br /&gt;
&lt;br /&gt;
My first year project idea was to create a parallel system that would impact the current AI's decision making by providing additional evaluation to candidate actions, since at that time(and maybe still, I am not sure), the CA evaluation results were statically defined. The problem with this approach, as I see it now, is that the system would be too complicated to implement and it would basically be another AI system with a different approach, not able to make decisions, but able to interfere with decisions made by the RCA AI loop. &lt;br /&gt;
&lt;br /&gt;
One of the good points I see in that project is the idea of a concurrent system. The RCA AI does a great job of separating the turn into logical sections, but is really limited in time, since it starts computation only after the AI system receives control. Tens of seconds and sometimes even minutes of CPU time is left without utilization, while human players(or even other AI players) make decisions and execute them. Even the animation time of movement, combat, recruiting, healing, etc., can be used for calculation. Modern CPU's can allow flawless execution of the game. On my PC wesnoth barely reaches 40% of CPU load at peak times. I really think the free time can be used for AI calculations.&lt;br /&gt;
&lt;br /&gt;
Another reason why I think this idea is good, is that AI developers that I discussed it with stated that they have algorithms implemented that do not meet reasonable time limits for termination. These algorithms might be used for testing the finished project and/or deployment into mainline. These algorithms are typically variants of exhaustive searches and are of exponential complexity, but can be reduced to polynomial complexity using heuristics and constraints.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=What can it do=&lt;br /&gt;
&lt;br /&gt;
'''The common AI structures'''&lt;br /&gt;
&lt;br /&gt;
* The movement maps: movement maps currently are recalculated on demand using a quadratic time algorithm. After moving a unit a movement map is invalidated and requires recalculation. Rewriting the algorithm in a way that concurrently calculates the movement maps would allow us to get constant time access to these structures. One might say that problems might occur, since if a player constantly makes moves, the movement map is recalculated each time. I am aware of this issue and will address it in the &amp;quot;Synchronization issues&amp;quot; section.&lt;br /&gt;
* The attack vectors: same as for movement maps, the attack vectors can become accessible in constant time if the algorithms are moved out to a concurrent block. &lt;br /&gt;
&lt;br /&gt;
'''More complicated algorithms'''&lt;br /&gt;
&lt;br /&gt;
* Positional analysis: are we ahead or are we behind? The answer to this question can be derived in many different ways, from trivial(counting the number of units on each side) to really complicated(analysing the formation, grouping of the forces, estimating gold and expansion potential, calculating possible battle outcomes). A simple &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; answer can tell us what to do next: attack or defend. An answer in the form of a floating point number(say, 0 &amp;lt;= x &amp;lt;= 1) can allow the RCA AI adjust the aspects of the AI. The possibilities and options are endless. The more power and precision we require from such an algorithm, the higher the complexity of it becomes. It will be up to the developer to decide how complex the algorithm can be and how often will it be able to finish in time. This might require some statistical work, but results can be very rewarding.&lt;br /&gt;
* Map analysis: another idea from my first year project proposal. I strongly believe that thorough map analysis before the game can have enormous impact on the AI strength. Such analysis can take into account the factions on in the current game, terrain analysis, map regions where we can set a strong formation, map regions where the enemy can stand strong, possible formation suggestions that can be used by CA's that make movement decisions. A great thing about map analysis is that can be static, which means, in a concurrent context, it can have unlimited computation time. If the algorithm is well-written, it can be partitioned to produce incremental results. &lt;br /&gt;
:E.g. (1) simple terrain analysis - O(n), simple formation analysis - O(n), simple &amp;quot;strong/weak&amp;quot; point detection - O(n), (2) more complex terrain analysis - O(n^2), formation analysis - O(n^2), etc, etc. Such an approach might be useful, in order to produce some results(even if they are not too useful) for CA's to use on the first turns. Such an algorithm can work throughout the whole game, it can even be designed to never terminate, the AI will grow stronger and stronger as the time goes.&lt;br /&gt;
&lt;br /&gt;
Note that these are only some examples of all the possible algorithms that the AI can make use of. I will repeat myself and say that implementing these algorithms is not part of my suggested project, but I will surely implement at least a couple(maybe even dummy) algorithms for testing and presentation purposes.&lt;br /&gt;
&lt;br /&gt;
=Synchronization issues=&lt;br /&gt;
&lt;br /&gt;
There is a certain issue with a concurrent approach to the AI in Wesnoth - we might become out of sync. A simple example could be: (1) movement maps are recalculated while a human player takes his turn; (2) human players ends turn with a move of one of his units; (3) the RCA loop gains control and makes a request for a movement map, that hasn't been recalculated yet.&lt;br /&gt;
It is obvious, that the concurrent approach does not seem to be too useful in a situation like this, and such a situation is not uncommon. The solution is to refactor the movement map calculation algorithm and instead of recalculation after each invalidation, we can recalculate the movements only for affected units. We can switch from a &amp;quot;destroy -&amp;gt; build new&amp;quot; to a &amp;quot;maintain the old one&amp;quot; approach. So, for the situation described above, if by any means the map was not yet calculated, the request will be a blocking call, but the wait time will not be long, since we only recalculate movements for one unit. This is a reduction from O(n^2) average, to O(n) worst-case and O(1) average. Same goes for attack vectors.&lt;br /&gt;
&lt;br /&gt;
The whole idea is that almost any out-of-sync problem can be mitigated with minimal damage with a linear algorithm. Even without complex analysis algorithms, concurrency can at least speed up the current AI. Also, complex algorithms that go out-of-sync, can be used &amp;quot;as is&amp;quot; in some situations. E.g. we are trying to determine our current position(whether we are winning or not) using some complex algorithm. It does not terminate for the current game state before the user ends his turn and some CA is requesting the positional coefficient. Usually 1-2 moves can not change the situation dramatically, for this reason, the error in coefficient can be treated as insignificant and used for decision making. Decisions might not be optimal, but will still be much better and stronger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Research and investigation=&lt;br /&gt;
&lt;br /&gt;
It is still unclear to me, how Lua fits in with concurrency, but I will do the needed research on the matter throughout the remainder of May. Even if it becomes clear that it is not possible to implement concurrent Lua support, the AI can still use all of the benefits that concurrent C++ algorithms can provide.&lt;br /&gt;
&lt;br /&gt;
Research on the currently used concurrency libraries and paradigms in Wesnoth will also be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Intended outcomes=&lt;br /&gt;
* fully completed concurrent block with clear interfaces and usage manuals&lt;br /&gt;
* all pre-gsoc tasks completed&lt;br /&gt;
* attack vectors refactored and enemy attacks vector available&lt;br /&gt;
* any other bugfixes and/or usage problem solution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pre-GSoC tasks'''&lt;br /&gt;
* reimplement persistent storage system for Lua AI engines - complete&lt;br /&gt;
* implement support for parameterized candidate actions&lt;br /&gt;
* investigation on concurrency in Wesnoth and Lua in particular&lt;br /&gt;
* candidate action unit filtering &lt;br /&gt;
* begin work on refactoring attack vector calculation and providing an enemy attacks vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Project timeline=&lt;br /&gt;
&lt;br /&gt;
Learning from previous years I will not separate tasks into mandatory and optional. Everything listed in the timeline is mandatory and I will allocate the most pessimistic time possible, to preserve staying on track. Also, the concurrency block project and the rest of the tasks(bugfixes, Lua CA improvements, enemy attacks, etc) will be done in parallel, 3 hours a day each at the very least, since I am free the whole summer and have no other commitments.&lt;br /&gt;
&lt;br /&gt;
The part of the timeline after the midterm evaluation period is not really clear, due to the fact that research on the matter has not been carried out yet and I am not certain about some aspects of the project(like support for Lua). Also, experience shows that things tend to go wrong, fall behind and just simply not work, so the time after midterm evaluations is very valuable for buffering any undone tasks. Tasks not associated with the concurrent block do not show up after August the 1st, but it does not mean that all of the time is going to be used for the concurrent block development, these tasks are not yet identified, but there is lots to be done for the AI, e.g. Lua AI's core.cpp got slightly out of hand and can use lots of refactoring, since it contains code duplication, functional inconsistencies and maybe even memory leaks(about 50% of the problems is introduced in my code, that I've done during my first GSoC).&lt;br /&gt;
&lt;br /&gt;
I am constantly in touch with active AI developers and LuaAI users, so I am always up-to-date on problems with the systems and suggestions for new features and functionality. Therefore, the timeline for the non-concurrency tasks may be altered.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Task &lt;br /&gt;
!Date&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
| Lua engine/CA/extCA storage system || Week starting on May 6th || Completed&lt;br /&gt;
|-&lt;br /&gt;
| Parameterized candidate actions support || Week starting on May 13th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of concurrency systems used in Wesnoth || May 13th - June 1st || In progress&lt;br /&gt;
|-&lt;br /&gt;
| CA Filters || Week starting on May 20th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of C++/Lua support for concurrency || Week starting on June 3rd  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Refactoring attacks vector calculation functions || Week starting on June 3rd till end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Creating a specification for the concurrent block || Week starting on June 10th  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Providing enemy attacks vector || Week starting on July 1st || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementing concurrency block interfaces and creating needed backend and statistical tools || From week starting on June 17th till the end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementation of the concurrency block and dummy algorithms for testing purposes || July - August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Assessment of progress, discussion with potential developers, testing/bugfixing, determining usability problems || First half of August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Stage of refactoring, attempts to translate and move existing algorithms into the concurrent block || 2nd half of August till mid September || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Finishing and cleaning up || Mid September - September 27th || Incomplete&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51020</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51020"/>
		<updated>2013-05-13T08:46:55Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
I learnt a lot of things during the last two summers while participating in GSoC for Wesnoth. I did a lot of analysis of the results of my work and discovered my strengths and weaknesses. I was thinking way too much about AI for the game in general while working mostly on tools to allow other developers make the computer play stronger strategically and tactically. &lt;br /&gt;
&lt;br /&gt;
My first year project was overly optimistic, I was not aware of the actual complexity and never even got to implementing it, since I was really behind on the mandatory tasks. Looking back to the project proposed by me in 2011 I can't say I am still excited about it in general, but it has a few very good points I would like to emphasize.&lt;br /&gt;
&lt;br /&gt;
There is no need to describe how difficult it is to create a strong AI player for a game like Wesnoth, capable of competing with experienced human players. While other GSoC ideas, like implementing a new recruitment algorithm or a defense strategy mechanism, will undoubtedly strenghten the AI, I want to propose an idea that can provide a completely new dimension for AI development for Wesnoth. I must also say that I only want to work and focus on the platform that will allow new possibilities for the AI, leaving the implementation of the actual AI algorithms to my free time and/or other developers that might now the strategic aspects of the game much better than me.&lt;br /&gt;
&lt;br /&gt;
=The concurrent block=&lt;br /&gt;
&lt;br /&gt;
My first year project idea was to create a parallel system that would impact the current AI's decision making by providing additional evaluation to candidate actions, since at that time(and maybe still, I am not sure), the CA evaluation results were statically defined. The problem with this approach, as I see it now, is that the system would be too complicated to implement and it would basically be another AI system with a different approach, not able to make decisions, but able to interfere with decisions made by the RCA AI loop. &lt;br /&gt;
&lt;br /&gt;
One of the good points I see in that project is the idea of a concurrent system. The RCA AI does a great job of separating the turn into logical sections, but is really limited in time, since it starts computation only after the AI system receives control. Tens of seconds and sometimes even minutes of CPU time is left without utilization, while human players(or even other AI players) make decisions and execute them. Even the animation time of movement, combat, recruiting, healing, etc., can be used for calculation. Modern CPU's can allow flawless execution of the game. On my PC wesnoth barely reaches 40% of CPU load at peak times. I really think the free time can be used for AI calculations.&lt;br /&gt;
&lt;br /&gt;
Another reason why I think this idea is good, is that AI developers that I discussed it with stated that they have algorithms implemented that do not meet reasonable time limits for termination. These algorithms might be used for testing the finished project and/or deployment into mainline. These algorithms are typically variants of exhaustive searches and are of exponential complexity, but can be reduced to polynomial complexity using heuristics and constraints.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=What can it do=&lt;br /&gt;
&lt;br /&gt;
'''The common AI structures'''&lt;br /&gt;
&lt;br /&gt;
* The movement maps: movement maps currently are recalculated on demand using a quadratic time algorithm. After moving a unit a movement map is invalidated and requires recalculation. Rewriting the algorithm in a way that concurrently calculates the movement maps would allow us to get constant time access to these structures. One might say that problems might occur, since if a player constantly makes moves, the movement map is recalculated each time. I am aware of this issue and will address it in the &amp;quot;Synchronization issues&amp;quot; section.&lt;br /&gt;
* The attack vectors: same as for movement maps, the attack vectors can become accessible in constant time if the algorithms are moved out to a concurrent block. &lt;br /&gt;
&lt;br /&gt;
'''More complicated algorithms'''&lt;br /&gt;
&lt;br /&gt;
* Positional analysis: are we ahead or are we behind? The answer to this question can be derived in many different ways, from trivial(counting the number of units on each side) to really complicated(analysing the formation, grouping of the forces, estimating gold and expansion potential, calculating possible battle outcomes). A simple &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; answer can tell us what to do next: attack or defend. An answer in the form of a floating point number(say, 0 &amp;lt;= x &amp;lt;= 1) can allow the RCA AI adjust the aspects of the AI. The possibilities and options are endless. The more power and precision we require from such an algorithm, the higher the complexity of it becomes. It will be up to the developer to decide how complex the algorithm can be and how often will it be able to finish in time. This might require some statistical work, but results can be very rewarding.&lt;br /&gt;
* Map analysis: another idea from my first year project proposal. I strongly believe that thorough map analysis before the game can have enormous impact on the AI strength. Such analysis can take into account the factions on in the current game, terrain analysis, map regions where we can set a strong formation, map regions where the enemy can stand strong, possible formation suggestions that can be used by CA's that make movement decisions. A great thing about map analysis is that can be static, which means, in a concurrent context, it can have unlimited computation time. If the algorithm is well-written, it can be partitioned to produce incremental results. &lt;br /&gt;
:E.g. (1) simple terrain analysis - O(n), simple formation analysis - O(n), simple &amp;quot;strong/weak&amp;quot; point detection - O(n), (2) more complex terrain analysis - O(n^2), formation analysis - O(n^2), etc, etc. Such an approach might be useful, in order to produce some results(even if they are not too useful) for CA's to use on the first turns. Such an algorithm can work throughout the whole game, it can even be designed to never terminate, the AI will grow stronger and stronger as the time goes.&lt;br /&gt;
&lt;br /&gt;
Note that these are only some examples of all the possible algorithms that the AI can make use of. I will repeat myself and say that implementing these algorithms is not part of my suggested project, but I will surely implement at least a couple(maybe even dummy) algorithms for testing and presentation purposes.&lt;br /&gt;
&lt;br /&gt;
=Synchronization issues=&lt;br /&gt;
&lt;br /&gt;
There is a certain issue with a concurrent approach to the AI in Wesnoth - we might become out of sync. A simple example could be: (1) movement maps are recalculated while a human player takes his turn; (2) human players ends turn with a move of one of his units; (3) the RCA loop gains control and makes a request for a movement map, that hasn't been recalculated yet.&lt;br /&gt;
It is obvious, that the concurrent approach does not seem to be too useful in a situation like this, and such a situation is not uncommon. The solution is to refactor the movement map calculation algorithm and instead of recalculation after each invalidation, we can recalculate the movements only for affected units. We can switch from a &amp;quot;destroy -&amp;gt; build new&amp;quot; to a &amp;quot;maintain the old one&amp;quot; approach. So, for the situation described above, if by any means the map was not yet calculated, the request will be a blocking call, but the wait time will not be long, since we only recalculate movements for one unit. This is a reduction from O(n^2) average, to O(n) worst-case and O(1) average. Same goes for attack vectors.&lt;br /&gt;
&lt;br /&gt;
The whole idea is that almost any out-of-sync problem can be mitigated with minimal damage with a linear algorithm. Even without complex analysis algorithms, concurrency can at least speed up the current AI. Also, complex algorithms that go out-of-sync, can be used &amp;quot;as is&amp;quot; in some situations. E.g. we are trying to determine our current position(whether we are winning or not) using some complex algorithm. It does not terminate for the current game state before the user ends his turn and some CA is requesting the positional coefficient. Usually 1-2 moves can not change the situation dramatically, for this reason, the error in coefficient can be treated as insignificant and used for decision making. Decisions might not be optimal, but will still be much better and stronger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Research and investigation=&lt;br /&gt;
&lt;br /&gt;
It is still unclear to me, how Lua fits in with concurrency, but I will do the needed research on the matter throughout the remainder of May. Even if it becomes clear that it is not possible to implement concurrent Lua support, the AI can still use all of the benefits that concurrent C++ algorithms can provide.&lt;br /&gt;
&lt;br /&gt;
Research on the currently used concurrency libraries and paradigms in Wesnoth will also be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Intended outcomes=&lt;br /&gt;
* fully completed concurrent block with clear interfaces and usage manuals&lt;br /&gt;
* all pre-gsoc tasks completed&lt;br /&gt;
* attack vectors refactored and enemy attacks vector available&lt;br /&gt;
* any other bugfixes and/or usage problem solution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pre-GSoC tasks'''&lt;br /&gt;
* reimplement persistent storage system for Lua AI engines - complete&lt;br /&gt;
* implement support for parameterized candidate actions&lt;br /&gt;
* investigation on concurrency in Wesnoth and Lua in particular&lt;br /&gt;
* candidate action unit filtering &lt;br /&gt;
* begin work on refactoring attack vector calculation and providing an enemy attacks vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Project timeline=&lt;br /&gt;
&lt;br /&gt;
Learning from previous years I will not separate tasks into mandatory and optional. Everything listed in the timeline is mandatory and I will allocate the most pessimistic time possible, to preserve staying on track. Also, the concurrency block project and the rest of the tasks(bugfixes, Lua CA improvements, enemy attacks, etc) will be done in parallel, 3 hours a day each at the very least, since I am free the whole summer and have no other commitments.&lt;br /&gt;
&lt;br /&gt;
The part of the timeline after the midterm evaluation period is not really clear, due to the fact that research on the matter has not been carried out yet and I am not certain about some aspects of the project(like support for Lua). Also, experience shows that things tend to go wrong, fall behind and just simply not work, so the time after midterm evaluations is very valuable for buffering any undone tasks. Tasks not associated with the concurrent block do not show up after August the 1st, but it does not mean that all of the time is going to be used for the concurrent block development, these tasks are not yet identified, but there is lots to be done for the AI, e.g. Lua AI's core.cpp got slightly out of hand and can use lots of refactoring, since it contains code duplication, functional inconsistencies and maybe even memory leaks(about 50% of the problems is introduced in my code, that I've done during my first GSoC).&lt;br /&gt;
&lt;br /&gt;
I am constantly in touch with active AI developers and LuaAI users, so I am always up-to-date on problems with the systems and suggestions for new features and functionality. Therefore, the timeline for the non-concurrency tasks may be altered.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Task &lt;br /&gt;
!Date&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
| Lua engine/CA/extCA storage system || Week starting on May 6th || Completed&lt;br /&gt;
|-&lt;br /&gt;
| Parameterized candidate actions support || Week starting on May 13th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of concurrency systems used in Wesnoth || May 13th - June 1st || In progress&lt;br /&gt;
|-&lt;br /&gt;
| CA Filters || Week starting on May 20th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of C++/Lua support for concurrency || Week starting on June 3rd  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Refactoring attacks vector calculation functions || Week starting on June 3rd till end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Creating a specification for the concurrent block || Week starting on June 10th  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Providing enemy attacks vector || Week starting on July 1st || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementing concurrency block interfaces and creating needed backend and statistical tools || From week starting on June 17th till the end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementation of the concurrency block and dummy algorithms for testing purposes || July - August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Assessment of progress, discussion with potential developers, testing/bugfixing, determining usability problems || First half of August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Stage of refactoring, attempts to translate and move existing algorithms into the concurrent block || 2nd half of August till mid September || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Finishing and cleaning up || Mid September - September 27th || Incomplete&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51019</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51019"/>
		<updated>2013-05-13T08:40:24Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Introduction&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I learnt a lot of things during the last two summers while participating in GSoC for Wesnoth. I did a lot of analysis of the results of my work and discovered my strengths and weaknesses. I was thinking way too much about AI for the game in general while working mostly on tools to allow other developers make the computer play stronger strategically and tactically. &lt;br /&gt;
&lt;br /&gt;
My first year project was overly optimistic, I was not aware of the actual complexity and never even got to implementing it, since I was really behind on the mandatory tasks. Looking back to the project proposed by me in 2011 I can't say I am still excited about it in general, but it has a few very good points I would like to emphasize.&lt;br /&gt;
&lt;br /&gt;
There is no need to describe how difficult it is to create a strong AI player for a game like Wesnoth, capable of competing with experienced human players. While other GSoC ideas, like implementing a new recruitment algorithm or a defense strategy mechanism, will undoubtedly strenghten the AI, I want to propose an idea that can provide a completely new dimension for AI development for Wesnoth. I must also say that I only want to work and focus on the platform that will allow new possibilities for the AI, leaving the implementation of the actual AI algorithms to my free time and/or other developers that might now the strategic aspects of the game much better than me.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;The concurrent block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
My first year project idea was to create a parallel system that would impact the current AI's decision making by providing additional evaluation to candidate actions, since at that time(and maybe still, I am not sure), the CA evaluation results were statically defined. The problem with this approach, as I see it now, is that the system would be too complicated to implement and it would basically be another AI system with a different approach, not able to make decisions, but able to interfere with decisions made by the RCA AI loop. &lt;br /&gt;
&lt;br /&gt;
One of the good points I see in that project is the idea of a concurrent system. The RCA AI does a great job of separating the turn into logical sections, but is really limited in time, since it starts computation only after the AI system receives control. Tens of seconds and sometimes even minutes of CPU time is left without utilization, while human players(or even other AI players) make decisions and execute them. Even the animation time of movement, combat, recruiting, healing, etc., can be used for calculation. Modern CPU's can allow flawless execution of the game. On my PC wesnoth barely reaches 40% of CPU load at peak times. I really think the free time can be used for AI calculations.&lt;br /&gt;
&lt;br /&gt;
Another reason why I think this idea is good, is that AI developers that I discussed it with stated that they have algorithms implemented that do not meet reasonable time limits for termination. These algorithms might be used for testing the finished project and/or deployment into mainline. These algorithms are typically variants of exhaustive searches and are of exponential complexity, but can be reduced to polynomial complexity using heuristics and constraints.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;What can it do&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;The common AI structures&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The movement maps: movement maps currently are recalculated on demand using a quadratic time algorithm. After moving a unit a movement map is invalidated and requires recalculation. Rewriting the algorithm in a way that concurrently calculates the movement maps would allow us to get constant time access to these structures. One might say that problems might occur, since if a player constantly makes moves, the movement map is recalculated each time. I am aware of this issue and will address it in the &amp;quot;Synchronization issues&amp;quot; section.&lt;br /&gt;
* The attack vectors: same as for movement maps, the attack vectors can become accessible in constant time if the algorithms are moved out to a concurrent block. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;More complicated algorithms&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Positional analysis: are we ahead or are we behind? The answer to this question can be derived in many different ways, from trivial(counting the number of units on each side) to really complicated(analysing the formation, grouping of the forces, estimating gold and expansion potential, calculating possible battle outcomes). A simple &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; answer can tell us what to do next: attack or defend. An answer in the form of a floating point number(say, 0 &amp;lt;= x &amp;lt;= 1) can allow the RCA AI adjust the aspects of the AI. The possibilities and options are endless. The more power and precision we require from such an algorithm, the higher the complexity of it becomes. It will be up to the developer to decide how complex the algorithm can be and how often will it be able to finish in time. This might require some statistical work, but results can be very rewarding.&lt;br /&gt;
* Map analysis: another idea from my first year project proposal. I strongly believe that thorough map analysis before the game can have enormous impact on the AI strength. Such analysis can take into account the factions on in the current game, terrain analysis, map regions where we can set a strong formation, map regions where the enemy can stand strong, possible formation suggestions that can be used by CA's that make movement decisions. A great thing about map analysis is that can be static, which means, in a concurrent context, it can have unlimited computation time. If the algorithm is well-written, it can be partitioned to produce incremental results. &lt;br /&gt;
:E.g. (1) simple terrain analysis - O(n), simple formation analysis - O(n), simple &amp;quot;strong/weak&amp;quot; point detection - O(n), (2) more complex terrain analysis - O(n^2), formation analysis - O(n^2), etc, etc. Such an approach might be useful, in order to produce some results(even if they are not too useful) for CA's to use on the first turns. Such an algorithm can work throughout the whole game, it can even be designed to never terminate, the AI will grow stronger and stronger as the time goes.&lt;br /&gt;
&lt;br /&gt;
Note that these are only some examples of all the possible algorithms that the AI can make use of. I will repeat myself and say that implementing these algorithms is not part of my suggested project, but I will surely implement at least a couple(maybe even dummy) algorithms for testing and presentation purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Synchronization issues&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a certain issue with a concurrent approach to the AI in Wesnoth - we might become out of sync. A simple example could be: (1) movement maps are recalculated while a human player takes his turn; (2) human players ends turn with a move of one of his units; (3) the RCA loop gains control and makes a request for a movement map, that hasn't been recalculated yet.&lt;br /&gt;
It is obvious, that the concurrent approach does not seem to be too useful in a situation like this, and such a situation is not uncommon. The solution is to refactor the movement map calculation algorithm and instead of recalculation after each invalidation, we can recalculate the movements only for affected units. We can switch from a &amp;quot;destroy -&amp;gt; build new&amp;quot;&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51015</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51015"/>
		<updated>2013-05-12T21:28:36Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* More complicated algorithms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
I learnt a lot of things during the last two summers while participating in GSoC for Wesnoth. I did a lot of analysis of the results of my work and discovered my strengths and weaknesses. I was thinking way too much about AI for the game in general while working mostly on tools to allow other developers make the computer play stronger strategically and tactically. &lt;br /&gt;
&lt;br /&gt;
My first year project was overly optimistic, I was not aware of the actual complexity and never even got to implementing it, since I was really behind on the mandatory tasks. Looking back to the project proposed by me in 2011 I can't say I am still excited about it in general, but it has a few very good points I would like to emphasize.&lt;br /&gt;
&lt;br /&gt;
There is no need to describe how difficult it is to create a strong AI player for a game like Wesnoth, capable of competing with experienced human players. While other GSoC ideas, like implementing a new recruitment algorithm or a defense strategy mechanism, will undoubtedly strenghten the AI, I want to propose an idea that can provide a completely new dimension for AI development for Wesnoth. I must also say that I only want to work and focus on the platform that will allow new possibilities for the AI, leaving the implementation of the actual AI algorithms to my free time and/or other developers that might now the strategic aspects of the game much better than me.&lt;br /&gt;
&lt;br /&gt;
==The concurrent block==&lt;br /&gt;
&lt;br /&gt;
My first year project idea was to create a parallel system that would impact the current AI's decision making by providing additional evaluation to candidate actions, since at that time(and maybe still, I am not sure), the CA evaluation results were statically defined. The problem with this approach, as I see it now, is that the system would be too complicated to implement and it would basically be another AI system with a different approach, not able to make decisions, but able to interfere with decisions made by the RCA AI loop. &lt;br /&gt;
&lt;br /&gt;
One of the good points I see in that project is the idea of a concurrent system. The RCA AI does a great job of separating the turn into logical sections, but is really limited in time, since it starts computation only after the AI system receives control. Tens of seconds and sometimes even minutes of CPU time is left without utilization, while human players(or even other AI players) make decisions and execute them. Even the animation time of movement, combat, recruiting, healing, etc., can be used for calculation. Modern CPU's can allow flawless execution of the game. On my PC wesnoth barely reaches 40% of CPU load at peak times. I really think the free time can be used for AI calculations.&lt;br /&gt;
&lt;br /&gt;
Another reason why I think this idea is good, is that AI developers that I discussed it with stated that they have algorithms implemented that do not meet reasonable time limits for termination. These algorithms might be used for testing the finished project and/or deployment into mainline. These algorithms are typically variants of exhaustive searches and are of exponential complexity, but can be reduced to polynomial complexity using heuristics and constraints.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What can it do==&lt;br /&gt;
&lt;br /&gt;
===The common AI structures===&lt;br /&gt;
&lt;br /&gt;
* The movement maps: movement maps currently are recalculated on demand using a quadratic time algorithm. After moving a unit a movement map is invalidated and requires recalculation. Rewriting the algorithm in a way that concurrently calculates the movement maps would allow us to get constant time access to these structures. One might say that problems might occur, since if a player constantly makes moves, the movement map is recalculated each time. I am aware of this issue and will address it in the &amp;quot;Synchronization issues&amp;quot; section.&lt;br /&gt;
* The attack vectors: same as for movement maps, the attack vectors can become accessible in constant time if the algorithms are moved out to a concurrent block. &lt;br /&gt;
&lt;br /&gt;
===More complicated algorithms===&lt;br /&gt;
&lt;br /&gt;
* Positional analysis: are we ahead or are we behind? The answer to this question can be derived in many different ways, from trivial(counting the number of units on each side) to really complicated(analysing the formation, grouping of the forces, estimating gold and expansion potential, calculating possible battle outcomes). A simple &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; answer can tell us what to do next: attack or defend. An answer in the form of a floating point number(say, 0 &amp;lt;= x &amp;lt;= 1) can allow the RCA AI adjust the aspects of the AI. The possibilities and options are endless. The more power and precision we require from such an algorithm, the higher the complexity of it becomes. It will be up to the developer to decide how complex the algorithm can be and how often will it be able to finish in time. This might require some statistical work, but results can be very rewarding.&lt;br /&gt;
* Map analysis: another idea from my first year project proposal. I strongly believe that thorough map analysis before the game can have enormous impact on the AI strength. Such analysis can take into account the factions on in the current game, terrain analysis, map regions where we can set a strong formation, map regions where the enemy can stand strong, possible formation suggestions that can be used by CA's that make movement decisions. A great thing about map analysis is that can be static, which means, in a concurrent context, it can have unlimited computation time. If the algorithm is well-written, it can be partitioned to produce incremental results. &lt;br /&gt;
:E.g. (1) simple terrain analysis - O(n), simple formation analysis - O(n), simple &amp;quot;strong/weak&amp;quot; point detection - O(n), (2) more complex terrain analysis - O(n^2), formation analysis - O(n^2), etc, etc. Such an approach might be useful, in order to produce some results(even if they are not too useful) for CA's to use on the first turns. Such an algorithm can work throughout the whole game, it can even be designed to never terminate, the AI will grow stronger and stronger as the time goes.&lt;br /&gt;
&lt;br /&gt;
Note that these are only some examples of all the possible algorithms that the AI can make use of. I will repeat myself and say that implementing these algorithms is not part of my suggested project, but I will surely implement at least a couple(maybe even dummy) algorithms for testing and presentation purposes.&lt;br /&gt;
&lt;br /&gt;
==Synchronization issues==&lt;br /&gt;
&lt;br /&gt;
There is a certain issue with a concurrent approach to the AI in Wesnoth - we might become out of sync. A simple example could be: (1) movement maps are recalculated while a human player takes his turn; (2) human players ends turn with a move of one of his units; (3) the RCA loop gains control and makes a request for a movement map, that hasn't been recalculated yet.&lt;br /&gt;
It is obvious, that the concurrent approach does not seem to be too useful in a situation like this, and such a situation is not uncommon. The solution is to refactor the movement map calculation algorithm and instead of recalculation after each invalidation, we can recalculate the movements only for affected units. We can switch from a &amp;quot;destroy -&amp;gt; build new&amp;quot; to a &amp;quot;maintain the old one&amp;quot; approach. So, for the situation described above, if by any means the map was not yet calculated, the request will be a blocking call, but the wait time will not be long, since we only recalculate movements for one unit. This is a reduction from O(n^2) average, to O(n) worst-case and O(1) average. Same goes for attack vectors.&lt;br /&gt;
&lt;br /&gt;
The whole idea is that almost any out-of-sync problem can be mitigated with minimal damage with a linear algorithm. Even without complex analysis algorithms, concurrency can at least speed up the current AI. Also, complex algorithms that go out-of-sync, can be used &amp;quot;as is&amp;quot; in some situations. E.g. we are trying to determine our current position(whether we are winning or not) using some complex algorithm. It does not terminate for the current game state before the user ends his turn and some CA is requesting the positional coefficient. Usually 1-2 moves can not change the situation dramatically, for this reason, the error in coefficient can be treated as insignificant and used for decision making. Decisions might not be optimal, but will still be much better and stronger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Research and investigation==&lt;br /&gt;
&lt;br /&gt;
It is still unclear to me, how Lua fits in with concurrency, but I will do the needed research on the matter throughout the remainder of May. Even if it becomes clear that it is not possible to implement concurrent Lua support, the AI can still use all of the benefits that concurrent C++ algorithms can provide.&lt;br /&gt;
&lt;br /&gt;
Research on the currently used concurrency libraries and paradigms in Wesnoth will also be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Intended outcomes==&lt;br /&gt;
* fully completed concurrent block with clear interfaces and usage manuals&lt;br /&gt;
* all pre-gsoc tasks completed&lt;br /&gt;
* attack vectors refactored and enemy attacks vector available&lt;br /&gt;
* any other bugfixes and/or usage problem solution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pre-GSoC tasks'''&lt;br /&gt;
* reimplement persistent storage system for Lua AI engines - complete&lt;br /&gt;
* implement support for parameterized candidate actions&lt;br /&gt;
* investigation on concurrency in Wesnoth and Lua in particular&lt;br /&gt;
* candidate action unit filtering &lt;br /&gt;
* begin work on refactoring attack vector calculation and providing an enemy attacks vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project timeline==&lt;br /&gt;
&lt;br /&gt;
Learning from previous years I will not separate tasks into mandatory and optional. Everything listed in the timeline is mandatory and I will allocate the most pessimistic time possible, to preserve staying on track. Also, the concurrency block project and the rest of the tasks(bugfixes, Lua CA improvements, enemy attacks, etc) will be done in parallel, 3 hours a day each at the very least, since I am free the whole summer and have no other commitments.&lt;br /&gt;
&lt;br /&gt;
The part of the timeline after the midterm evaluation period is not really clear, due to the fact that research on the matter has not been carried out yet and I am not certain about some aspects of the project(like support for Lua). Also, experience shows that things tend to go wrong, fall behind and just simply not work, so the time after midterm evaluations is very valuable for buffering any undone tasks. Tasks not associated with the concurrent block do not show up after August the 1st, but it does not mean that all of the time is going to be used for the concurrent block development, these tasks are not yet identified, but there is lots to be done for the AI, e.g. Lua AI's core.cpp got slightly out of hand and can use lots of refactoring, since it contains code duplication, functional inconsistencies and maybe even memory leaks(about 50% of the problems is introduced in my code, that I've done during my first GSoC).&lt;br /&gt;
&lt;br /&gt;
I am constantly in touch with active AI developers and LuaAI users, so I am always up-to-date on problems with the systems and suggestions for new features and functionality. Therefore, the timeline for the non-concurrency tasks may be altered.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Task &lt;br /&gt;
!Date&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
| Lua engine/CA/extCA storage system || Week starting on May 6th || Completed&lt;br /&gt;
|-&lt;br /&gt;
| Parameterized candidate actions support || Week starting on May 13th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of concurrency systems used in Wesnoth || May 13th - June 1st || In progress&lt;br /&gt;
|-&lt;br /&gt;
| CA Filters || Week starting on May 20th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of C++/Lua support for concurrency || Week starting on June 3rd  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Refactoring attacks vector calculation functions || Week starting on June 3rd till end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Creating a specification for the concurrent block || Week starting on June 10th  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Providing enemy attacks vector || Week starting on July 1st || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementing concurrency block interfaces and creating needed backend and statistical tools || From week starting on June 17th till the end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementation of the concurrency block and dummy algorithms for testing purposes || July - August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Assessment of progress, discussion with potential developers, testing/bugfixing, determining usability problems || First half of August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Stage of refactoring, attempts to translate and move existing algorithms into the concurrent block || 2nd half of August till mid September || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Finishing and cleaning up || Mid September - September 27th || Incomplete&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51014</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51014"/>
		<updated>2013-05-12T21:27:33Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Project timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
I learnt a lot of things during the last two summers while participating in GSoC for Wesnoth. I did a lot of analysis of the results of my work and discovered my strengths and weaknesses. I was thinking way too much about AI for the game in general while working mostly on tools to allow other developers make the computer play stronger strategically and tactically. &lt;br /&gt;
&lt;br /&gt;
My first year project was overly optimistic, I was not aware of the actual complexity and never even got to implementing it, since I was really behind on the mandatory tasks. Looking back to the project proposed by me in 2011 I can't say I am still excited about it in general, but it has a few very good points I would like to emphasize.&lt;br /&gt;
&lt;br /&gt;
There is no need to describe how difficult it is to create a strong AI player for a game like Wesnoth, capable of competing with experienced human players. While other GSoC ideas, like implementing a new recruitment algorithm or a defense strategy mechanism, will undoubtedly strenghten the AI, I want to propose an idea that can provide a completely new dimension for AI development for Wesnoth. I must also say that I only want to work and focus on the platform that will allow new possibilities for the AI, leaving the implementation of the actual AI algorithms to my free time and/or other developers that might now the strategic aspects of the game much better than me.&lt;br /&gt;
&lt;br /&gt;
==The concurrent block==&lt;br /&gt;
&lt;br /&gt;
My first year project idea was to create a parallel system that would impact the current AI's decision making by providing additional evaluation to candidate actions, since at that time(and maybe still, I am not sure), the CA evaluation results were statically defined. The problem with this approach, as I see it now, is that the system would be too complicated to implement and it would basically be another AI system with a different approach, not able to make decisions, but able to interfere with decisions made by the RCA AI loop. &lt;br /&gt;
&lt;br /&gt;
One of the good points I see in that project is the idea of a concurrent system. The RCA AI does a great job of separating the turn into logical sections, but is really limited in time, since it starts computation only after the AI system receives control. Tens of seconds and sometimes even minutes of CPU time is left without utilization, while human players(or even other AI players) make decisions and execute them. Even the animation time of movement, combat, recruiting, healing, etc., can be used for calculation. Modern CPU's can allow flawless execution of the game. On my PC wesnoth barely reaches 40% of CPU load at peak times. I really think the free time can be used for AI calculations.&lt;br /&gt;
&lt;br /&gt;
Another reason why I think this idea is good, is that AI developers that I discussed it with stated that they have algorithms implemented that do not meet reasonable time limits for termination. These algorithms might be used for testing the finished project and/or deployment into mainline. These algorithms are typically variants of exhaustive searches and are of exponential complexity, but can be reduced to polynomial complexity using heuristics and constraints.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What can it do==&lt;br /&gt;
&lt;br /&gt;
===The common AI structures===&lt;br /&gt;
&lt;br /&gt;
* The movement maps: movement maps currently are recalculated on demand using a quadratic time algorithm. After moving a unit a movement map is invalidated and requires recalculation. Rewriting the algorithm in a way that concurrently calculates the movement maps would allow us to get constant time access to these structures. One might say that problems might occur, since if a player constantly makes moves, the movement map is recalculated each time. I am aware of this issue and will address it in the &amp;quot;Synchronization issues&amp;quot; section.&lt;br /&gt;
* The attack vectors: same as for movement maps, the attack vectors can become accessible in constant time if the algorithms are moved out to a concurrent block. &lt;br /&gt;
&lt;br /&gt;
===More complicated algorithms===&lt;br /&gt;
&lt;br /&gt;
* Positional analysis: are we ahead or are we behind? The answer to this question can be derived in many different ways, from trivial(counting the number of units on each side) to really complicated(analysing the formation, grouping of the forces, estimating gold and expansion potential, calculating possible battle outcomes). A simple &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; answer can tell us what to do next: attack or defend. An answer in the form of a floating point number(say, 0 &amp;lt;= x &amp;lt;= 1) can allow the RCA AI adjust the aspects of the AI. The possibilities and options are endless. The more power and precision we require from such an algorithm, the higher the complexity of it becomes. It will be up to the developer to decide how complex the algorithm can be and how often will it be able to finish in time. This might require some statistical work, but results can be very rewarding.&lt;br /&gt;
* Map analysis: another idea from my first year project proposal. I strongly believe that thorough map analysis before the game can have enormous impact on the AI strength. Such analysis can take into account the factions on in the current game, terrain analysis, map regions where we can set a strong formation, map regions where the enemy can stand strong, possible formation suggestions that can be used by CA's that make movement decisions. A great thing about map analysis is that can be static, which means, in a concurrent context, it can have unlimited computation time. If the algorithm is well-written, it can be partitioned to produce incremental results. &lt;br /&gt;
E.g. (1) simple terrain analysis - O(n), simple formation analysis - O(n), simple &amp;quot;strong/weak&amp;quot; point detection - O(n), (2) more complex terrain analysis - O(n^2), formation analysis - O(n^2), etc, etc. Such an approach might be useful, in order to produce some results(even if they are not too useful) for CA's to use on the first turns. Such an algorithm can work throughout the whole game, it can even be designed to never terminate, the AI will grow stronger and stronger as the time goes.&lt;br /&gt;
&lt;br /&gt;
Note that these are only some examples of all the possible algorithms that the AI can make use of. I will repeat myself and say that implementing these algorithms is not part of my suggested project, but I will surely implement at least a couple(maybe even dummy) algorithms for testing and presentation purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Synchronization issues==&lt;br /&gt;
&lt;br /&gt;
There is a certain issue with a concurrent approach to the AI in Wesnoth - we might become out of sync. A simple example could be: (1) movement maps are recalculated while a human player takes his turn; (2) human players ends turn with a move of one of his units; (3) the RCA loop gains control and makes a request for a movement map, that hasn't been recalculated yet.&lt;br /&gt;
It is obvious, that the concurrent approach does not seem to be too useful in a situation like this, and such a situation is not uncommon. The solution is to refactor the movement map calculation algorithm and instead of recalculation after each invalidation, we can recalculate the movements only for affected units. We can switch from a &amp;quot;destroy -&amp;gt; build new&amp;quot; to a &amp;quot;maintain the old one&amp;quot; approach. So, for the situation described above, if by any means the map was not yet calculated, the request will be a blocking call, but the wait time will not be long, since we only recalculate movements for one unit. This is a reduction from O(n^2) average, to O(n) worst-case and O(1) average. Same goes for attack vectors.&lt;br /&gt;
&lt;br /&gt;
The whole idea is that almost any out-of-sync problem can be mitigated with minimal damage with a linear algorithm. Even without complex analysis algorithms, concurrency can at least speed up the current AI. Also, complex algorithms that go out-of-sync, can be used &amp;quot;as is&amp;quot; in some situations. E.g. we are trying to determine our current position(whether we are winning or not) using some complex algorithm. It does not terminate for the current game state before the user ends his turn and some CA is requesting the positional coefficient. Usually 1-2 moves can not change the situation dramatically, for this reason, the error in coefficient can be treated as insignificant and used for decision making. Decisions might not be optimal, but will still be much better and stronger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Research and investigation==&lt;br /&gt;
&lt;br /&gt;
It is still unclear to me, how Lua fits in with concurrency, but I will do the needed research on the matter throughout the remainder of May. Even if it becomes clear that it is not possible to implement concurrent Lua support, the AI can still use all of the benefits that concurrent C++ algorithms can provide.&lt;br /&gt;
&lt;br /&gt;
Research on the currently used concurrency libraries and paradigms in Wesnoth will also be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Intended outcomes==&lt;br /&gt;
* fully completed concurrent block with clear interfaces and usage manuals&lt;br /&gt;
* all pre-gsoc tasks completed&lt;br /&gt;
* attack vectors refactored and enemy attacks vector available&lt;br /&gt;
* any other bugfixes and/or usage problem solution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pre-GSoC tasks'''&lt;br /&gt;
* reimplement persistent storage system for Lua AI engines - complete&lt;br /&gt;
* implement support for parameterized candidate actions&lt;br /&gt;
* investigation on concurrency in Wesnoth and Lua in particular&lt;br /&gt;
* candidate action unit filtering &lt;br /&gt;
* begin work on refactoring attack vector calculation and providing an enemy attacks vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project timeline==&lt;br /&gt;
&lt;br /&gt;
Learning from previous years I will not separate tasks into mandatory and optional. Everything listed in the timeline is mandatory and I will allocate the most pessimistic time possible, to preserve staying on track. Also, the concurrency block project and the rest of the tasks(bugfixes, Lua CA improvements, enemy attacks, etc) will be done in parallel, 3 hours a day each at the very least, since I am free the whole summer and have no other commitments.&lt;br /&gt;
&lt;br /&gt;
The part of the timeline after the midterm evaluation period is not really clear, due to the fact that research on the matter has not been carried out yet and I am not certain about some aspects of the project(like support for Lua). Also, experience shows that things tend to go wrong, fall behind and just simply not work, so the time after midterm evaluations is very valuable for buffering any undone tasks. Tasks not associated with the concurrent block do not show up after August the 1st, but it does not mean that all of the time is going to be used for the concurrent block development, these tasks are not yet identified, but there is lots to be done for the AI, e.g. Lua AI's core.cpp got slightly out of hand and can use lots of refactoring, since it contains code duplication, functional inconsistencies and maybe even memory leaks(about 50% of the problems is introduced in my code, that I've done during my first GSoC).&lt;br /&gt;
&lt;br /&gt;
I am constantly in touch with active AI developers and LuaAI users, so I am always up-to-date on problems with the systems and suggestions for new features and functionality. Therefore, the timeline for the non-concurrency tasks may be altered.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Task &lt;br /&gt;
!Date&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
| Lua engine/CA/extCA storage system || Week starting on May 6th || Completed&lt;br /&gt;
|-&lt;br /&gt;
| Parameterized candidate actions support || Week starting on May 13th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of concurrency systems used in Wesnoth || May 13th - June 1st || In progress&lt;br /&gt;
|-&lt;br /&gt;
| CA Filters || Week starting on May 20th || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Investigation of C++/Lua support for concurrency || Week starting on June 3rd  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Refactoring attacks vector calculation functions || Week starting on June 3rd till end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Creating a specification for the concurrent block || Week starting on June 10th  || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Providing enemy attacks vector || Week starting on July 1st || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementing concurrency block interfaces and creating needed backend and statistical tools || From week starting on June 17th till the end of June || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Implementation of the concurrency block and dummy algorithms for testing purposes || July - August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Assessment of progress, discussion with potential developers, testing/bugfixing, determining usability problems || First half of August || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Stage of refactoring, attempts to translate and move existing algorithms into the concurrent block || 2nd half of August till mid September || Incomplete&lt;br /&gt;
|-&lt;br /&gt;
| Finishing and cleaning up || Mid September - September 27th || Incomplete&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51013</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=51013"/>
		<updated>2013-05-12T20:56:30Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
I learnt a lot of things during the last two summers while participating in GSoC for Wesnoth. I did a lot of analysis of the results of my work and discovered my strengths and weaknesses. I was thinking way too much about AI for the game in general while working mostly on tools to allow other developers make the computer play stronger strategically and tactically. &lt;br /&gt;
&lt;br /&gt;
My first year project was overly optimistic, I was not aware of the actual complexity and never even got to implementing it, since I was really behind on the mandatory tasks. Looking back to the project proposed by me in 2011 I can't say I am still excited about it in general, but it has a few very good points I would like to emphasize.&lt;br /&gt;
&lt;br /&gt;
There is no need to describe how difficult it is to create a strong AI player for a game like Wesnoth, capable of competing with experienced human players. While other GSoC ideas, like implementing a new recruitment algorithm or a defense strategy mechanism, will undoubtedly strenghten the AI, I want to propose an idea that can provide a completely new dimension for AI development for Wesnoth. I must also say that I only want to work and focus on the platform that will allow new possibilities for the AI, leaving the implementation of the actual AI algorithms to my free time and/or other developers that might now the strategic aspects of the game much better than me.&lt;br /&gt;
&lt;br /&gt;
==The concurrent block==&lt;br /&gt;
&lt;br /&gt;
My first year project idea was to create a parallel system that would impact the current AI's decision making by providing additional evaluation to candidate actions, since at that time(and maybe still, I am not sure), the CA evaluation results were statically defined. The problem with this approach, as I see it now, is that the system would be too complicated to implement and it would basically be another AI system with a different approach, not able to make decisions, but able to interfere with decisions made by the RCA AI loop. &lt;br /&gt;
&lt;br /&gt;
One of the good points I see in that project is the idea of a concurrent system. The RCA AI does a great job of separating the turn into logical sections, but is really limited in time, since it starts computation only after the AI system receives control. Tens of seconds and sometimes even minutes of CPU time is left without utilization, while human players(or even other AI players) make decisions and execute them. Even the animation time of movement, combat, recruiting, healing, etc., can be used for calculation. Modern CPU's can allow flawless execution of the game. On my PC wesnoth barely reaches 40% of CPU load at peak times. I really think the free time can be used for AI calculations.&lt;br /&gt;
&lt;br /&gt;
Another reason why I think this idea is good, is that AI developers that I discussed it with stated that they have algorithms implemented that do not meet reasonable time limits for termination. These algorithms might be used for testing the finished project and/or deployment into mainline. These algorithms are typically variants of exhaustive searches and are of exponential complexity, but can be reduced to polynomial complexity using heuristics and constraints.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What can it do==&lt;br /&gt;
&lt;br /&gt;
===The common AI structures===&lt;br /&gt;
&lt;br /&gt;
* The movement maps: movement maps currently are recalculated on demand using a quadratic time algorithm. After moving a unit a movement map is invalidated and requires recalculation. Rewriting the algorithm in a way that concurrently calculates the movement maps would allow us to get constant time access to these structures. One might say that problems might occur, since if a player constantly makes moves, the movement map is recalculated each time. I am aware of this issue and will address it in the &amp;quot;Synchronization issues&amp;quot; section.&lt;br /&gt;
* The attack vectors: same as for movement maps, the attack vectors can become accessible in constant time if the algorithms are moved out to a concurrent block. &lt;br /&gt;
&lt;br /&gt;
===More complicated algorithms===&lt;br /&gt;
&lt;br /&gt;
* Positional analysis: are we ahead or are we behind? The answer to this question can be derived in many different ways, from trivial(counting the number of units on each side) to really complicated(analysing the formation, grouping of the forces, estimating gold and expansion potential, calculating possible battle outcomes). A simple &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; answer can tell us what to do next: attack or defend. An answer in the form of a floating point number(say, 0 &amp;lt;= x &amp;lt;= 1) can allow the RCA AI adjust the aspects of the AI. The possibilities and options are endless. The more power and precision we require from such an algorithm, the higher the complexity of it becomes. It will be up to the developer to decide how complex the algorithm can be and how often will it be able to finish in time. This might require some statistical work, but results can be very rewarding.&lt;br /&gt;
* Map analysis: another idea from my first year project proposal. I strongly believe that thorough map analysis before the game can have enormous impact on the AI strength. Such analysis can take into account the factions on in the current game, terrain analysis, map regions where we can set a strong formation, map regions where the enemy can stand strong, possible formation suggestions that can be used by CA's that make movement decisions. A great thing about map analysis is that can be static, which means, in a concurrent context, it can have unlimited computation time. If the algorithm is well-written, it can be partitioned to produce incremental results. &lt;br /&gt;
E.g. (1) simple terrain analysis - O(n), simple formation analysis - O(n), simple &amp;quot;strong/weak&amp;quot; point detection - O(n), (2) more complex terrain analysis - O(n^2), formation analysis - O(n^2), etc, etc. Such an approach might be useful, in order to produce some results(even if they are not too useful) for CA's to use on the first turns. Such an algorithm can work throughout the whole game, it can even be designed to never terminate, the AI will grow stronger and stronger as the time goes.&lt;br /&gt;
&lt;br /&gt;
Note that these are only some examples of all the possible algorithms that the AI can make use of. I will repeat myself and say that implementing these algorithms is not part of my suggested project, but I will surely implement at least a couple(maybe even dummy) algorithms for testing and presentation purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Synchronization issues==&lt;br /&gt;
&lt;br /&gt;
There is a certain issue with a concurrent approach to the AI in Wesnoth - we might become out of sync. A simple example could be: (1) movement maps are recalculated while a human player takes his turn; (2) human players ends turn with a move of one of his units; (3) the RCA loop gains control and makes a request for a movement map, that hasn't been recalculated yet.&lt;br /&gt;
It is obvious, that the concurrent approach does not seem to be too useful in a situation like this, and such a situation is not uncommon. The solution is to refactor the movement map calculation algorithm and instead of recalculation after each invalidation, we can recalculate the movements only for affected units. We can switch from a &amp;quot;destroy -&amp;gt; build new&amp;quot; to a &amp;quot;maintain the old one&amp;quot; approach. So, for the situation described above, if by any means the map was not yet calculated, the request will be a blocking call, but the wait time will not be long, since we only recalculate movements for one unit. This is a reduction from O(n^2) average, to O(n) worst-case and O(1) average. Same goes for attack vectors.&lt;br /&gt;
&lt;br /&gt;
The whole idea is that almost any out-of-sync problem can be mitigated with minimal damage with a linear algorithm. Even without complex analysis algorithms, concurrency can at least speed up the current AI. Also, complex algorithms that go out-of-sync, can be used &amp;quot;as is&amp;quot; in some situations. E.g. we are trying to determine our current position(whether we are winning or not) using some complex algorithm. It does not terminate for the current game state before the user ends his turn and some CA is requesting the positional coefficient. Usually 1-2 moves can not change the situation dramatically, for this reason, the error in coefficient can be treated as insignificant and used for decision making. Decisions might not be optimal, but will still be much better and stronger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Research and investigation==&lt;br /&gt;
&lt;br /&gt;
It is still unclear to me, how Lua fits in with concurrency, but I will do the needed research on the matter throughout the remainder of May. Even if it becomes clear that it is not possible to implement concurrent Lua support, the AI can still use all of the benefits that concurrent C++ algorithms can provide.&lt;br /&gt;
&lt;br /&gt;
Research on the currently used concurrency libraries and paradigms in Wesnoth will also be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Intended outcomes==&lt;br /&gt;
* fully completed concurrent block with clear interfaces and usage manuals&lt;br /&gt;
* all pre-gsoc tasks completed&lt;br /&gt;
* attack vectors refactored and enemy attacks vector available&lt;br /&gt;
* any other bugfixes and/or usage problem solution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pre-GSoC tasks'''&lt;br /&gt;
* reimplement persistent storage system for Lua AI engines - complete&lt;br /&gt;
* implement support for parameterized candidate actions&lt;br /&gt;
* investigation on concurrency in Wesnoth and Lua in particular&lt;br /&gt;
* candidate action unit filtering &lt;br /&gt;
* begin work on refactoring attack vector calculation and providing an enemy attacks vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project timeline==&lt;br /&gt;
&lt;br /&gt;
Learning from previous years I will not separate tasks into mandatory and optional. Everything listed in the timeline is mandatory and I will allocate the most pessimistic time possible, to preserve staying on track. Also, the concurrency block project and the rest of the tasks(bugfixes, Lua CA improvements, enemy attacks, etc) will be done in parallel, 3 hours a day each at the very least, since I am free the whole summer and have no other commitments.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=50812</id>
		<title>Nephro SoC2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Nephro_SoC2013&amp;diff=50812"/>
		<updated>2013-05-02T23:16:42Z</updated>

		<summary type="html">&lt;p&gt;Nephro: Created page with '{{SoC2013Student}} Category:SoC_Ideas_Your_Own_Ideas2013  =Description= &amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt; Registered this as a placeholder. Currently under heavy exam load…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC_Ideas_Your_Own_Ideas2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Nephro - AI project SoC2013&amp;lt;/h4&amp;gt;&lt;br /&gt;
Registered this as a placeholder. Currently under heavy exam load, page will be done till Saturday.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaAI&amp;diff=47070</id>
		<title>LuaAI</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaAI&amp;diff=47070"/>
		<updated>2012-08-15T09:47:11Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Debug access to the AI tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page containing information on configuring the AI using Lua.  In addition to the technical information on this page, a tutorial-style guide is also available at [[Lua AI Howto]]. &lt;br /&gt;
&lt;br /&gt;
NB: previous contents of the page moved to http://wiki.wesnoth.org/LuaAI(old)&lt;br /&gt;
&lt;br /&gt;
== Aspects ==&lt;br /&gt;
Patch r49721 enabled users to write aspects using Lua. This simplifies the definition of aspects that are meant to change depending on the game state. A good example could be aggression, which changes depending on the time of the day(since ToD affects the actual battle performance of your forces).&amp;lt;br /&amp;gt;&lt;br /&gt;
Static aggression:&lt;br /&gt;
 [aspect]&lt;br /&gt;
 	id=&amp;quot;aggression&amp;quot;&lt;br /&gt;
 	engine=&amp;quot;lua&amp;quot;&lt;br /&gt;
 	value=&amp;quot;0.3&amp;quot;&lt;br /&gt;
 [/aspect]&lt;br /&gt;
Dynamic aggression:&lt;br /&gt;
 [aspect]&lt;br /&gt;
 	id=aggression&lt;br /&gt;
 	engine=lua&lt;br /&gt;
 	     &lt;br /&gt;
 	code=&amp;lt;&amp;lt;&lt;br /&gt;
 		wesnoth.fire(&amp;quot;store_time_of_day&amp;quot;)&lt;br /&gt;
 		local value = 0&lt;br /&gt;
 		tod = tostring(wesnoth.get_variable('time_of_day').name) &lt;br /&gt;
 		if (tod == 'Morning') then&lt;br /&gt;
 			value = 0.2&lt;br /&gt;
 		else&lt;br /&gt;
 			value = 1&lt;br /&gt;
 		end&lt;br /&gt;
 	&lt;br /&gt;
 		wesnoth.fire(&amp;quot;clear_variable&amp;quot;, {name = &amp;quot;time_of_day&amp;quot;})&lt;br /&gt;
 		return value&lt;br /&gt;
 	&amp;gt;&amp;gt;      &lt;br /&gt;
 [/aspect]&lt;br /&gt;
&lt;br /&gt;
Note: the way of getting the ToD is hacky here, but I will create a more elegant method soon(Nephro).&amp;lt;br /&amp;gt;&lt;br /&gt;
Also note the difference between 'code' and 'value' attributes, this is important.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
At the moment, it is possible to create the following aspects using Lua(the list will be constantly updated):&lt;br /&gt;
 aggression                                   // double&lt;br /&gt;
 attack_depth                                 // int&lt;br /&gt;
 avoid                                        // exposed as map_location[], where map_location is a table of form {x, y}&lt;br /&gt;
 caution                                      // double&lt;br /&gt;
 grouping                                     // string&lt;br /&gt;
 leader_aggression                            // double&lt;br /&gt;
 leader_goal                                  // exposed as a config&lt;br /&gt;
 leader_value                                 // double&lt;br /&gt;
 number_of_possible_recruits_to_force_recruit // double&lt;br /&gt;
 passive_leader                               // bool&lt;br /&gt;
 passive_leader_shares_keep                   // bool&lt;br /&gt;
 recruitment_ignore_bad_combat                // bool&lt;br /&gt;
 recruitment_ignore_bad_movement              // bool&lt;br /&gt;
 recruitment_pattern                          // string[]&lt;br /&gt;
 scout_village_targeting                      // double&lt;br /&gt;
 simple_targeting                             // bool&lt;br /&gt;
 support_villages                             // bool&lt;br /&gt;
 village_value                                // double&lt;br /&gt;
 villages_per_scout                           // int&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: simple numeric, bool and string aspect creation can be enabled just by adding a specific factory to registry.cpp, this will also soon be done.&lt;br /&gt;
&lt;br /&gt;
To get the value of a specific aspect in Lua we have to use the &lt;br /&gt;
 ai.get_&amp;lt;aspect_name&amp;gt;()&lt;br /&gt;
function. E.g.&lt;br /&gt;
 local aggression = ai.get_aggression()&lt;br /&gt;
&lt;br /&gt;
== Preload event ==&lt;br /&gt;
&lt;br /&gt;
It is a good idea to have such a preload event in your scenario if you are intending to use Lua for AI programming or customizing. The code of this event will most probably be moved out to a macro(except for the line that requires patrol.lua, since it is not necessary).&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot; &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
 &lt;br /&gt;
 	    wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 	    &amp;gt;&amp;gt;&lt;br /&gt;
 	[/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
The code attribute can be further expanded by any Lua code needed. For example, we can set up some global variables there or include additional code libraries(&amp;quot;wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&amp;quot; - includes code that handles patrolling of units).&lt;br /&gt;
&lt;br /&gt;
== Engine code ==&lt;br /&gt;
&lt;br /&gt;
In the engine tag you should define functions that will handle evaluation and execution of your custom candidate actions and stages. You can also run some code that is intended to be run once in the beginning.&amp;lt;br /&amp;gt;&lt;br /&gt;
The definition of the [engine] tag should be place inside the [ai] tag.&lt;br /&gt;
&lt;br /&gt;
 [engine]&lt;br /&gt;
     name=&amp;quot;lua&amp;quot;&lt;br /&gt;
     code= &amp;lt;&amp;lt;&lt;br /&gt;
         -- your engine code here&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&lt;br /&gt;
== Stages ==&lt;br /&gt;
Once the engine has been set up, we can start adding stages to the configuration of our AI.&amp;lt;br /&amp;gt;&lt;br /&gt;
To add a stage we just use the [stage] tag.&lt;br /&gt;
 [stage]&lt;br /&gt;
     engine=lua&lt;br /&gt;
     code=&amp;lt;&amp;lt;&lt;br /&gt;
         -- Code for stage execution here&lt;br /&gt;
         -- It is better to call predefined functions for the [engine] code, &lt;br /&gt;
         -- than to define the functions here, to keep the structure of the stages clear&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
== Candidate actions ==&lt;br /&gt;
This is an example from the current version of the lua_ai arena. The stage with an id &amp;quot;ca_loop&amp;quot; is the RCA AI loop stage, as we can see from its name. Currently it has two candidate actions, both Lua backed. &lt;br /&gt;
&lt;br /&gt;
             [stage]&lt;br /&gt;
                 name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
 		id=ca_loop&lt;br /&gt;
                 [candidate_action]&lt;br /&gt;
                     engine=lua&lt;br /&gt;
                     name=first&lt;br /&gt;
 		    id=firstca&lt;br /&gt;
                     evaluation=&amp;quot;return (...):candidate_action_evaluation_hello()&amp;quot;&lt;br /&gt;
                     execution=&amp;quot;local ai, cfg = ...; ai:candidate_action_execution_hello(cfg)&amp;quot;&lt;br /&gt;
                 [/candidate_action]&lt;br /&gt;
                 [candidate_action]&lt;br /&gt;
                     engine=lua&lt;br /&gt;
                     name=second&lt;br /&gt;
                     evaluation=&amp;quot;return (...):candidate_action_evaluation_hello2()&amp;quot;&lt;br /&gt;
                     execution=&amp;quot;(...):candidate_action_execution_hello2()&amp;quot;&lt;br /&gt;
                 [/candidate_action]&lt;br /&gt;
             [/stage]&lt;br /&gt;
Basically, we need to have an engine attribute, an evaluation and execution functions. The syntax (...):foo() means &amp;quot;call eng.foo(eng) where eng is whatever the engine code returns&amp;quot;. We can also add, remove, modify candidate actions on the fly, using wesnoth.wml_actions.modify_ai() functionality. Behavior(sticky) candidate actions use this approach.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behavior(sticky) candidate actions ==&lt;br /&gt;
Sometimes we need a specific unit to do a specific action in our scenario, e.g. we want a scout unit to patrol between 3 places on the map, to provide us with visibility needed. In this case we can create a sticky candidate action that will tie itself to the unit, and remove itself when the unit has died. The syntax for defining a sticky candidate action is the following:&lt;br /&gt;
 [event]&lt;br /&gt;
 	name=side 2 turn 1&lt;br /&gt;
 	first_time_only=yes	&lt;br /&gt;
         [add_ai_behavior]&lt;br /&gt;
            side=2&lt;br /&gt;
            [filter]&lt;br /&gt;
                 name=&amp;quot;Rark&amp;quot;&lt;br /&gt;
            [/filter]&lt;br /&gt;
 	   sticky=yes&lt;br /&gt;
 	   loop_id=ca_loop&lt;br /&gt;
            evaluation=&amp;quot;return patrol_eval_rark()&amp;quot;&lt;br /&gt;
            execution=&amp;quot;patrol_rark()&amp;quot;&lt;br /&gt;
         [/add_ai_behavior]&lt;br /&gt;
 [/event]&lt;br /&gt;
Here the behavior CA is added to the configuration of the AI when the event triggers. Obviously this will happen when side 2 gets its first turn, but the event can be whatever needed. The definition is very similar to a simple candidate action, but here we also filter out a unit and state that we want the behavior to be sticky. If we don't, the action will not try to remove itself, when the unit gets killed, and this could cause errors.&amp;lt;br /&amp;gt;&lt;br /&gt;
Such CA`s can also be added from inside other CA or stage code using wesnoth.wml_actions.add_ai_behavior(cfg) function.&lt;br /&gt;
&lt;br /&gt;
== Behavior function library ==&lt;br /&gt;
Behaviors are defined using generators. A behavior generator receives arguments(unit info, configuration, etc) and returns a pair of functions: evaluator and executor. These functions are to be passed to the add_ai_behavior tag, or directly to the function.&lt;br /&gt;
=== Patrolling ===&lt;br /&gt;
The only behavior defined at the moment is the patrol behavior. After calling patrol_gen(name, locations), we receive a pair of functions to use for creation of candidate actions&amp;lt;br /&amp;gt;&lt;br /&gt;
Inclusion of the patrolling code: &lt;br /&gt;
 wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
Usage:&lt;br /&gt;
 local patrol_rark = patrol_gen(&amp;quot;Rark&amp;quot;, {{x=14, y=7}, {x=15, y=7}, {x=15, y=8}, {x=14, y=8}})&lt;br /&gt;
 -- patrol_rark.exec -- execution function&lt;br /&gt;
 -- patrol_rark.eval -- evaluation function&lt;br /&gt;
As you can see, the first argument is the name of the unit, the second is a table of coordinates of arbitrary length.&lt;br /&gt;
&lt;br /&gt;
==Goals and targets==&lt;br /&gt;
&lt;br /&gt;
When deciding what move to do next, the AI uses targets(markers on the map, pointing to villages, units, locations, etc). Targets are produced by goal objects. There are multiple predefined goal objects of different types in the C++ implementation, but now it is possible to define goal objects in Lua.&lt;br /&gt;
&lt;br /&gt;
 [goal]&lt;br /&gt;
 	name=lua_goal&lt;br /&gt;
 	value=6&lt;br /&gt;
 	engine=lua&lt;br /&gt;
 	code = &amp;lt;&amp;lt;&lt;br /&gt;
 		local t = {&lt;br /&gt;
 	 	    t[1] = {value=2.3, type=3, loc={x=5, y=6} }&lt;br /&gt;
 	 	    t[2] = {value=2.4, type=4, loc={x=4, y=16} }&lt;br /&gt;
  		}&lt;br /&gt;
  		return t&lt;br /&gt;
  	&amp;gt;&amp;gt;&lt;br /&gt;
 [/goal]&lt;br /&gt;
 &lt;br /&gt;
As you can see, the return value must be a table containing 0 or more targets. Each target must contain the three fields: &amp;quot;loc&amp;quot;, &amp;quot;type&amp;quot;, &amp;quot;value&amp;quot;. This code will then be parsed by the Lua engine and the targets will be available to use to any engine desired. To get the targets inside Lua, a simple &lt;br /&gt;
 local tg = ai.get_targets() &lt;br /&gt;
must be called. tg will contain a table of the same format, as one described in the goal definition code upper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Persistence ==&lt;br /&gt;
&lt;br /&gt;
If you need to store some data between save/load routines, you probably need a place to store the data. For this purpose, a field named &amp;quot;data&amp;quot; is automatically added to the return value of your engine code. The save routine will find this field, convert it to a config and store its content in readable format. When the scenario gets loaded back, the engine code will inject the data back in the AI context. All other data will be lost. Note that all content of &amp;quot;data&amp;quot; needs to be in WML table format, otherwise it will not be saved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debug access to the AI tree ==&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(side) &lt;br /&gt;
-- has been added. The function only works in debug mode and returns a table containing the component tree of the active AI for a side, the engine functions and the accessor to the ai.* table of the LuaAI  Also allows the user to execute stages and evaluate/execute candidate actions(eval and exec can be run independently).&lt;br /&gt;
&lt;br /&gt;
Structure of the table(example):&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
     stage_hello = function: 0x6dc24c0,&lt;br /&gt;
     get_ai = function: 0x6dc25d0,&lt;br /&gt;
     data = {&lt;br /&gt;
                },&lt;br /&gt;
     do_moves = function: 0x6dc2590,&lt;br /&gt;
     candidate_action_evaluation_hello = function: 0x6dc2560,&lt;br /&gt;
     candidate_action_evaluation_hello2 = function: 0x6dc2640,&lt;br /&gt;
     components = {&lt;br /&gt;
                          id = &amp;quot;&amp;quot;,&lt;br /&gt;
                          stage = {&lt;br /&gt;
                                          another_stage = {&lt;br /&gt;
                                                                  name = &amp;quot;another_stage&amp;quot;,&lt;br /&gt;
                                                                  id = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                  exec = function: 0x17cd3bb,&lt;br /&gt;
                                                                  engine = &amp;quot;lua&amp;quot;,&lt;br /&gt;
                                                                  stg_ptr = &amp;quot;userdata: 0x7c5a8d0&amp;quot;&lt;br /&gt;
                                                              },&lt;br /&gt;
                                          testing_ai_default::candidate_action_evaluation_loop = {&lt;br /&gt;
                                                                                                          name = &amp;quot;testing_ai_default::candidate_action_evaluation_loop&amp;quot;,&lt;br /&gt;
                                                                                                        candidate_action = {&lt;br /&gt;
                                                                                                                                   external = {&lt;br /&gt;
                                                                                                                                                      name = &amp;quot;external&amp;quot;,&lt;br /&gt;
                                                                                                                                                      id = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                                                                                                      exec = function: 0x17cd2f3,&lt;br /&gt;
                                                                                                                                                      engine = &amp;quot;lua&amp;quot;,&lt;br /&gt;
                                                                                                                                                      ca_ptr = &amp;quot;userdata: 0x6fb3600&amp;quot;&lt;br /&gt;
                                                                                                                                                  },&lt;br /&gt;
                                                                                                                                   second = {&lt;br /&gt;
                                                                                                                                                    name = &amp;quot;second&amp;quot;,&lt;br /&gt;
                                                                                                                                                    id = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                                                                                                    exec = function: 0x17cd2f3,&lt;br /&gt;
                                                                                                                                                    engine = &amp;quot;lua&amp;quot;,&lt;br /&gt;
                                                                                                                                                    ca_ptr = &amp;quot;userdata: 0x6fb2f50&amp;quot;&lt;br /&gt;
                                                                                                                                                }&lt;br /&gt;
                                                                                                                               },&lt;br /&gt;
                                                                                                        id = &amp;quot;ca_loop&amp;quot;,&lt;br /&gt;
                                                                                                        exec = function: 0x17cd3bb,&lt;br /&gt;
                                                                                                        engine = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                                                        stg_ptr = &amp;quot;userdata: 0x6fb2728&amp;quot;&lt;br /&gt;
                                                                                                    }&lt;br /&gt;
                                     },&lt;br /&gt;
                         engine = &amp;quot;&amp;quot;,&lt;br /&gt;
                         name = &amp;quot;&amp;quot;&lt;br /&gt;
                     },&lt;br /&gt;
    candidate_action_execution_hello2 = function: 0x6dc2670,&lt;br /&gt;
    candidate_action_execution_hello = function: 0x6dc2530&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The fields described as &amp;quot; name = function: 0xXXXXXXXX&amp;quot; are functions and can be called to using the usual function call syntax of Lua.&lt;br /&gt;
 wesnoth.debug_ai(2).get_ai() -- will return the AI table of the Lua AI context.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(2).stage[another_stage].exec() -- will execute the stage.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(2).get_ai().get_aggression() -- will the return the current value of the aggression aspect of the AI&lt;br /&gt;
&lt;br /&gt;
Therefore, we have up-to-date access to the whole AI, including the data segment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NB!&amp;lt;/b&amp;gt;: the back-end of this function will be refactored quite drastically and that may involve usage syntax changes. This shouldn't be a big problem, since this function is only used for debugging and won't work in non-debug mode. If something suddenly stops working for you, come back to this page and watch the updates.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaAI&amp;diff=47069</id>
		<title>LuaAI</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaAI&amp;diff=47069"/>
		<updated>2012-08-15T09:43:52Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Debug access to the AI tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page containing information on configuring the AI using Lua.  In addition to the technical information on this page, a tutorial-style guide is also available at [[Lua AI Howto]]. &lt;br /&gt;
&lt;br /&gt;
NB: previous contents of the page moved to http://wiki.wesnoth.org/LuaAI(old)&lt;br /&gt;
&lt;br /&gt;
== Aspects ==&lt;br /&gt;
Patch r49721 enabled users to write aspects using Lua. This simplifies the definition of aspects that are meant to change depending on the game state. A good example could be aggression, which changes depending on the time of the day(since ToD affects the actual battle performance of your forces).&amp;lt;br /&amp;gt;&lt;br /&gt;
Static aggression:&lt;br /&gt;
 [aspect]&lt;br /&gt;
 	id=&amp;quot;aggression&amp;quot;&lt;br /&gt;
 	engine=&amp;quot;lua&amp;quot;&lt;br /&gt;
 	value=&amp;quot;0.3&amp;quot;&lt;br /&gt;
 [/aspect]&lt;br /&gt;
Dynamic aggression:&lt;br /&gt;
 [aspect]&lt;br /&gt;
 	id=aggression&lt;br /&gt;
 	engine=lua&lt;br /&gt;
 	     &lt;br /&gt;
 	code=&amp;lt;&amp;lt;&lt;br /&gt;
 		wesnoth.fire(&amp;quot;store_time_of_day&amp;quot;)&lt;br /&gt;
 		local value = 0&lt;br /&gt;
 		tod = tostring(wesnoth.get_variable('time_of_day').name) &lt;br /&gt;
 		if (tod == 'Morning') then&lt;br /&gt;
 			value = 0.2&lt;br /&gt;
 		else&lt;br /&gt;
 			value = 1&lt;br /&gt;
 		end&lt;br /&gt;
 	&lt;br /&gt;
 		wesnoth.fire(&amp;quot;clear_variable&amp;quot;, {name = &amp;quot;time_of_day&amp;quot;})&lt;br /&gt;
 		return value&lt;br /&gt;
 	&amp;gt;&amp;gt;      &lt;br /&gt;
 [/aspect]&lt;br /&gt;
&lt;br /&gt;
Note: the way of getting the ToD is hacky here, but I will create a more elegant method soon(Nephro).&amp;lt;br /&amp;gt;&lt;br /&gt;
Also note the difference between 'code' and 'value' attributes, this is important.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
At the moment, it is possible to create the following aspects using Lua(the list will be constantly updated):&lt;br /&gt;
 aggression                                   // double&lt;br /&gt;
 attack_depth                                 // int&lt;br /&gt;
 avoid                                        // exposed as map_location[], where map_location is a table of form {x, y}&lt;br /&gt;
 caution                                      // double&lt;br /&gt;
 grouping                                     // string&lt;br /&gt;
 leader_aggression                            // double&lt;br /&gt;
 leader_goal                                  // exposed as a config&lt;br /&gt;
 leader_value                                 // double&lt;br /&gt;
 number_of_possible_recruits_to_force_recruit // double&lt;br /&gt;
 passive_leader                               // bool&lt;br /&gt;
 passive_leader_shares_keep                   // bool&lt;br /&gt;
 recruitment_ignore_bad_combat                // bool&lt;br /&gt;
 recruitment_ignore_bad_movement              // bool&lt;br /&gt;
 recruitment_pattern                          // string[]&lt;br /&gt;
 scout_village_targeting                      // double&lt;br /&gt;
 simple_targeting                             // bool&lt;br /&gt;
 support_villages                             // bool&lt;br /&gt;
 village_value                                // double&lt;br /&gt;
 villages_per_scout                           // int&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: simple numeric, bool and string aspect creation can be enabled just by adding a specific factory to registry.cpp, this will also soon be done.&lt;br /&gt;
&lt;br /&gt;
To get the value of a specific aspect in Lua we have to use the &lt;br /&gt;
 ai.get_&amp;lt;aspect_name&amp;gt;()&lt;br /&gt;
function. E.g.&lt;br /&gt;
 local aggression = ai.get_aggression()&lt;br /&gt;
&lt;br /&gt;
== Preload event ==&lt;br /&gt;
&lt;br /&gt;
It is a good idea to have such a preload event in your scenario if you are intending to use Lua for AI programming or customizing. The code of this event will most probably be moved out to a macro(except for the line that requires patrol.lua, since it is not necessary).&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot; &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
 &lt;br /&gt;
 	    wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 	    &amp;gt;&amp;gt;&lt;br /&gt;
 	[/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
The code attribute can be further expanded by any Lua code needed. For example, we can set up some global variables there or include additional code libraries(&amp;quot;wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&amp;quot; - includes code that handles patrolling of units).&lt;br /&gt;
&lt;br /&gt;
== Engine code ==&lt;br /&gt;
&lt;br /&gt;
In the engine tag you should define functions that will handle evaluation and execution of your custom candidate actions and stages. You can also run some code that is intended to be run once in the beginning.&amp;lt;br /&amp;gt;&lt;br /&gt;
The definition of the [engine] tag should be place inside the [ai] tag.&lt;br /&gt;
&lt;br /&gt;
 [engine]&lt;br /&gt;
     name=&amp;quot;lua&amp;quot;&lt;br /&gt;
     code= &amp;lt;&amp;lt;&lt;br /&gt;
         -- your engine code here&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&lt;br /&gt;
== Stages ==&lt;br /&gt;
Once the engine has been set up, we can start adding stages to the configuration of our AI.&amp;lt;br /&amp;gt;&lt;br /&gt;
To add a stage we just use the [stage] tag.&lt;br /&gt;
 [stage]&lt;br /&gt;
     engine=lua&lt;br /&gt;
     code=&amp;lt;&amp;lt;&lt;br /&gt;
         -- Code for stage execution here&lt;br /&gt;
         -- It is better to call predefined functions for the [engine] code, &lt;br /&gt;
         -- than to define the functions here, to keep the structure of the stages clear&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
== Candidate actions ==&lt;br /&gt;
This is an example from the current version of the lua_ai arena. The stage with an id &amp;quot;ca_loop&amp;quot; is the RCA AI loop stage, as we can see from its name. Currently it has two candidate actions, both Lua backed. &lt;br /&gt;
&lt;br /&gt;
             [stage]&lt;br /&gt;
                 name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
 		id=ca_loop&lt;br /&gt;
                 [candidate_action]&lt;br /&gt;
                     engine=lua&lt;br /&gt;
                     name=first&lt;br /&gt;
 		    id=firstca&lt;br /&gt;
                     evaluation=&amp;quot;return (...):candidate_action_evaluation_hello()&amp;quot;&lt;br /&gt;
                     execution=&amp;quot;local ai, cfg = ...; ai:candidate_action_execution_hello(cfg)&amp;quot;&lt;br /&gt;
                 [/candidate_action]&lt;br /&gt;
                 [candidate_action]&lt;br /&gt;
                     engine=lua&lt;br /&gt;
                     name=second&lt;br /&gt;
                     evaluation=&amp;quot;return (...):candidate_action_evaluation_hello2()&amp;quot;&lt;br /&gt;
                     execution=&amp;quot;(...):candidate_action_execution_hello2()&amp;quot;&lt;br /&gt;
                 [/candidate_action]&lt;br /&gt;
             [/stage]&lt;br /&gt;
Basically, we need to have an engine attribute, an evaluation and execution functions. The syntax (...):foo() means &amp;quot;call eng.foo(eng) where eng is whatever the engine code returns&amp;quot;. We can also add, remove, modify candidate actions on the fly, using wesnoth.wml_actions.modify_ai() functionality. Behavior(sticky) candidate actions use this approach.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behavior(sticky) candidate actions ==&lt;br /&gt;
Sometimes we need a specific unit to do a specific action in our scenario, e.g. we want a scout unit to patrol between 3 places on the map, to provide us with visibility needed. In this case we can create a sticky candidate action that will tie itself to the unit, and remove itself when the unit has died. The syntax for defining a sticky candidate action is the following:&lt;br /&gt;
 [event]&lt;br /&gt;
 	name=side 2 turn 1&lt;br /&gt;
 	first_time_only=yes	&lt;br /&gt;
         [add_ai_behavior]&lt;br /&gt;
            side=2&lt;br /&gt;
            [filter]&lt;br /&gt;
                 name=&amp;quot;Rark&amp;quot;&lt;br /&gt;
            [/filter]&lt;br /&gt;
 	   sticky=yes&lt;br /&gt;
 	   loop_id=ca_loop&lt;br /&gt;
            evaluation=&amp;quot;return patrol_eval_rark()&amp;quot;&lt;br /&gt;
            execution=&amp;quot;patrol_rark()&amp;quot;&lt;br /&gt;
         [/add_ai_behavior]&lt;br /&gt;
 [/event]&lt;br /&gt;
Here the behavior CA is added to the configuration of the AI when the event triggers. Obviously this will happen when side 2 gets its first turn, but the event can be whatever needed. The definition is very similar to a simple candidate action, but here we also filter out a unit and state that we want the behavior to be sticky. If we don't, the action will not try to remove itself, when the unit gets killed, and this could cause errors.&amp;lt;br /&amp;gt;&lt;br /&gt;
Such CA`s can also be added from inside other CA or stage code using wesnoth.wml_actions.add_ai_behavior(cfg) function.&lt;br /&gt;
&lt;br /&gt;
== Behavior function library ==&lt;br /&gt;
Behaviors are defined using generators. A behavior generator receives arguments(unit info, configuration, etc) and returns a pair of functions: evaluator and executor. These functions are to be passed to the add_ai_behavior tag, or directly to the function.&lt;br /&gt;
=== Patrolling ===&lt;br /&gt;
The only behavior defined at the moment is the patrol behavior. After calling patrol_gen(name, locations), we receive a pair of functions to use for creation of candidate actions&amp;lt;br /&amp;gt;&lt;br /&gt;
Inclusion of the patrolling code: &lt;br /&gt;
 wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
Usage:&lt;br /&gt;
 local patrol_rark = patrol_gen(&amp;quot;Rark&amp;quot;, {{x=14, y=7}, {x=15, y=7}, {x=15, y=8}, {x=14, y=8}})&lt;br /&gt;
 -- patrol_rark.exec -- execution function&lt;br /&gt;
 -- patrol_rark.eval -- evaluation function&lt;br /&gt;
As you can see, the first argument is the name of the unit, the second is a table of coordinates of arbitrary length.&lt;br /&gt;
&lt;br /&gt;
==Goals and targets==&lt;br /&gt;
&lt;br /&gt;
When deciding what move to do next, the AI uses targets(markers on the map, pointing to villages, units, locations, etc). Targets are produced by goal objects. There are multiple predefined goal objects of different types in the C++ implementation, but now it is possible to define goal objects in Lua.&lt;br /&gt;
&lt;br /&gt;
 [goal]&lt;br /&gt;
 	name=lua_goal&lt;br /&gt;
 	value=6&lt;br /&gt;
 	engine=lua&lt;br /&gt;
 	code = &amp;lt;&amp;lt;&lt;br /&gt;
 		local t = {&lt;br /&gt;
 	 	    t[1] = {value=2.3, type=3, loc={x=5, y=6} }&lt;br /&gt;
 	 	    t[2] = {value=2.4, type=4, loc={x=4, y=16} }&lt;br /&gt;
  		}&lt;br /&gt;
  		return t&lt;br /&gt;
  	&amp;gt;&amp;gt;&lt;br /&gt;
 [/goal]&lt;br /&gt;
 &lt;br /&gt;
As you can see, the return value must be a table containing 0 or more targets. Each target must contain the three fields: &amp;quot;loc&amp;quot;, &amp;quot;type&amp;quot;, &amp;quot;value&amp;quot;. This code will then be parsed by the Lua engine and the targets will be available to use to any engine desired. To get the targets inside Lua, a simple &lt;br /&gt;
 local tg = ai.get_targets() &lt;br /&gt;
must be called. tg will contain a table of the same format, as one described in the goal definition code upper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Persistence ==&lt;br /&gt;
&lt;br /&gt;
If you need to store some data between save/load routines, you probably need a place to store the data. For this purpose, a field named &amp;quot;data&amp;quot; is automatically added to the return value of your engine code. The save routine will find this field, convert it to a config and store its content in readable format. When the scenario gets loaded back, the engine code will inject the data back in the AI context. All other data will be lost. Note that all content of &amp;quot;data&amp;quot; needs to be in WML table format, otherwise it will not be saved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debug access to the AI tree ==&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(side) &lt;br /&gt;
-- has been added. The function only works in debug mode and returns a table containing the component tree of the active AI for a side, the engine functions and the accessor to the ai.* table of the LuaAI  Also allows the user to execute stages and evaluate/execute candidate actions(eval and exec can be run independently).&lt;br /&gt;
&lt;br /&gt;
Structure of the table(example):&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
     stage_hello = function: 0x6dc24c0,&lt;br /&gt;
     get_ai = function: 0x6dc25d0,&lt;br /&gt;
     data = {&lt;br /&gt;
                },&lt;br /&gt;
     do_moves = function: 0x6dc2590,&lt;br /&gt;
     candidate_action_evaluation_hello = function: 0x6dc2560,&lt;br /&gt;
     candidate_action_evaluation_hello2 = function: 0x6dc2640,&lt;br /&gt;
     components = {&lt;br /&gt;
                          id = &amp;quot;&amp;quot;,&lt;br /&gt;
                          stage = {&lt;br /&gt;
                                          another_stage = {&lt;br /&gt;
                                                                  name = &amp;quot;another_stage&amp;quot;,&lt;br /&gt;
                                                                  id = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                  exec = function: 0x17cd3bb,&lt;br /&gt;
                                                                  engine = &amp;quot;lua&amp;quot;,&lt;br /&gt;
                                                                  stg_ptr = &amp;quot;userdata: 0x7c5a8d0&amp;quot;&lt;br /&gt;
                                                              },&lt;br /&gt;
                                          testing_ai_default::candidate_action_evaluation_loop = {&lt;br /&gt;
                                                                                                          name = &amp;quot;testing_ai_default::candidate_action_evaluation_loop&amp;quot;,&lt;br /&gt;
                                                                                                        candidate_action = {&lt;br /&gt;
                                                                                                                                   external = {&lt;br /&gt;
                                                                                                                                                      name = &amp;quot;external&amp;quot;,&lt;br /&gt;
                                                                                                                                                      id = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                                                                                                      exec = function: 0x17cd2f3,&lt;br /&gt;
                                                                                                                                                      engine = &amp;quot;lua&amp;quot;,&lt;br /&gt;
                                                                                                                                                      ca_ptr = &amp;quot;userdata: 0x6fb3600&amp;quot;&lt;br /&gt;
                                                                                                                                                  },&lt;br /&gt;
                                                                                                                                   second = {&lt;br /&gt;
                                                                                                                                                    name = &amp;quot;second&amp;quot;,&lt;br /&gt;
                                                                                                                                                    id = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                                                                                                    exec = function: 0x17cd2f3,&lt;br /&gt;
                                                                                                                                                    engine = &amp;quot;lua&amp;quot;,&lt;br /&gt;
                                                                                                                                                    ca_ptr = &amp;quot;userdata: 0x6fb2f50&amp;quot;&lt;br /&gt;
                                                                                                                                                }&lt;br /&gt;
                                                                                                                               },&lt;br /&gt;
                                                                                                        id = &amp;quot;ca_loop&amp;quot;,&lt;br /&gt;
                                                                                                        exec = function: 0x17cd3bb,&lt;br /&gt;
                                                                                                        engine = &amp;quot;&amp;quot;,&lt;br /&gt;
                                                                                                        stg_ptr = &amp;quot;userdata: 0x6fb2728&amp;quot;&lt;br /&gt;
                                                                                                    }&lt;br /&gt;
                                     },&lt;br /&gt;
                         engine = &amp;quot;&amp;quot;,&lt;br /&gt;
                         name = &amp;quot;&amp;quot;&lt;br /&gt;
                     },&lt;br /&gt;
    candidate_action_execution_hello2 = function: 0x6dc2670,&lt;br /&gt;
    candidate_action_execution_hello = function: 0x6dc2530&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The fields described as &amp;quot; name = function: 0xXXXXXXXX&amp;quot; are functions and can be called to using the usual function call syntax of Lua.&lt;br /&gt;
 wesnoth.debug_ai(2).get_ai() -- will return the AI table of the Lua AI context.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(2).stage[another_stage].exec() -- will execute the stage.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(2).get_ai().get_aggression() -- will the return the current value of the aggression aspect of the AI&lt;br /&gt;
&lt;br /&gt;
Therefore, we have up-to-date access to the whole AI, including the data segment.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaAI&amp;diff=47031</id>
		<title>LuaAI</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaAI&amp;diff=47031"/>
		<updated>2012-08-06T18:03:38Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page containing information on configuring the AI using Lua.  In addition to the technical information on this page, a tutorial-style guide is also available at [[Lua AI Howto]]. &lt;br /&gt;
&lt;br /&gt;
NB: previous contents of the page moved to http://wiki.wesnoth.org/LuaAI(old)&lt;br /&gt;
&lt;br /&gt;
== Aspects ==&lt;br /&gt;
Patch r49721 enabled users to write aspects using Lua. This simplifies the definition of aspects that are meant to change depending on the game state. A good example could be aggression, which changes depending on the time of the day(since ToD affects the actual battle performance of your forces).&amp;lt;br /&amp;gt;&lt;br /&gt;
Static aggression:&lt;br /&gt;
 [aspect]&lt;br /&gt;
 	id=&amp;quot;aggression&amp;quot;&lt;br /&gt;
 	engine=&amp;quot;lua&amp;quot;&lt;br /&gt;
 	value=&amp;quot;0.3&amp;quot;&lt;br /&gt;
 [/aspect]&lt;br /&gt;
Dynamic aggression:&lt;br /&gt;
 [aspect]&lt;br /&gt;
 	id=aggression&lt;br /&gt;
 	engine=lua&lt;br /&gt;
 	     &lt;br /&gt;
 	code=&amp;lt;&amp;lt;&lt;br /&gt;
 		wesnoth.fire(&amp;quot;store_time_of_day&amp;quot;)&lt;br /&gt;
 		local value = 0&lt;br /&gt;
 		tod = tostring(wesnoth.get_variable('time_of_day').name) &lt;br /&gt;
 		if (tod == 'Morning') then&lt;br /&gt;
 			value = 0.2&lt;br /&gt;
 		else&lt;br /&gt;
 			value = 1&lt;br /&gt;
 		end&lt;br /&gt;
 	&lt;br /&gt;
 		wesnoth.fire(&amp;quot;clear_variable&amp;quot;, {name = &amp;quot;time_of_day&amp;quot;})&lt;br /&gt;
 		return value&lt;br /&gt;
 	&amp;gt;&amp;gt;      &lt;br /&gt;
 [/aspect]&lt;br /&gt;
&lt;br /&gt;
Note: the way of getting the ToD is hacky here, but I will create a more elegant method soon(Nephro).&amp;lt;br /&amp;gt;&lt;br /&gt;
Also note the difference between 'code' and 'value' attributes, this is important.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
At the moment, it is possible to create the following aspects using Lua(the list will be constantly updated):&lt;br /&gt;
 aggression                                   // double&lt;br /&gt;
 attack_depth                                 // int&lt;br /&gt;
 avoid                                        // exposed as map_location[], where map_location is a table of form {x, y}&lt;br /&gt;
 caution                                      // double&lt;br /&gt;
 grouping                                     // string&lt;br /&gt;
 leader_aggression                            // double&lt;br /&gt;
 leader_goal                                  // exposed as a config&lt;br /&gt;
 leader_value                                 // double&lt;br /&gt;
 number_of_possible_recruits_to_force_recruit // double&lt;br /&gt;
 passive_leader                               // bool&lt;br /&gt;
 passive_leader_shares_keep                   // bool&lt;br /&gt;
 recruitment_ignore_bad_combat                // bool&lt;br /&gt;
 recruitment_ignore_bad_movement              // bool&lt;br /&gt;
 recruitment_pattern                          // string[]&lt;br /&gt;
 scout_village_targeting                      // double&lt;br /&gt;
 simple_targeting                             // bool&lt;br /&gt;
 support_villages                             // bool&lt;br /&gt;
 village_value                                // double&lt;br /&gt;
 villages_per_scout                           // int&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: simple numeric, bool and string aspect creation can be enabled just by adding a specific factory to registry.cpp, this will also soon be done.&lt;br /&gt;
&lt;br /&gt;
To get the value of a specific aspect in Lua we have to use the &lt;br /&gt;
 ai.get_&amp;lt;aspect_name&amp;gt;()&lt;br /&gt;
function. E.g.&lt;br /&gt;
 local aggression = ai.get_aggression()&lt;br /&gt;
&lt;br /&gt;
== Preload event ==&lt;br /&gt;
&lt;br /&gt;
It is a good idea to have such a preload event in your scenario if you are intending to use Lua for AI programming or customizing. The code of this event will most probably be moved out to a macro(except for the line that requires patrol.lua, since it is not necessary).&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot; &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
 &lt;br /&gt;
 	    wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 	    &amp;gt;&amp;gt;&lt;br /&gt;
 	[/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
The code attribute can be further expanded by any Lua code needed. For example, we can set up some global variables there or include additional code libraries(&amp;quot;wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&amp;quot; - includes code that handles patrolling of units).&lt;br /&gt;
&lt;br /&gt;
== Engine code ==&lt;br /&gt;
&lt;br /&gt;
In the engine tag you should define functions that will handle evaluation and execution of your custom candidate actions and stages. You can also run some code that is intended to be run once in the beginning.&amp;lt;br /&amp;gt;&lt;br /&gt;
The definition of the [engine] tag should be place inside the [ai] tag.&lt;br /&gt;
&lt;br /&gt;
 [engine]&lt;br /&gt;
     name=&amp;quot;lua&amp;quot;&lt;br /&gt;
     code= &amp;lt;&amp;lt;&lt;br /&gt;
         -- your engine code here&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&lt;br /&gt;
== Stages ==&lt;br /&gt;
Once the engine has been set up, we can start adding stages to the configuration of our AI.&amp;lt;br /&amp;gt;&lt;br /&gt;
To add a stage we just use the [stage] tag.&lt;br /&gt;
 [stage]&lt;br /&gt;
     engine=lua&lt;br /&gt;
     code=&amp;lt;&amp;lt;&lt;br /&gt;
         -- Code for stage execution here&lt;br /&gt;
         -- It is better to call predefined functions for the [engine] code, &lt;br /&gt;
         -- than to define the functions here, to keep the structure of the stages clear&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
== Candidate actions ==&lt;br /&gt;
This is an example from the current version of the lua_ai arena. The stage with an id &amp;quot;ca_loop&amp;quot; is the RCA AI loop stage, as we can see from its name. Currently it has two candidate actions, both Lua backed. &lt;br /&gt;
&lt;br /&gt;
             [stage]&lt;br /&gt;
                 name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
 		id=ca_loop&lt;br /&gt;
                 [candidate_action]&lt;br /&gt;
                     engine=lua&lt;br /&gt;
                     name=first&lt;br /&gt;
 		    id=firstca&lt;br /&gt;
                     evaluation=&amp;quot;return (...):candidate_action_evaluation_hello()&amp;quot;&lt;br /&gt;
                     execution=&amp;quot;local ai, cfg = ...; ai:candidate_action_execution_hello(cfg)&amp;quot;&lt;br /&gt;
                 [/candidate_action]&lt;br /&gt;
                 [candidate_action]&lt;br /&gt;
                     engine=lua&lt;br /&gt;
                     name=second&lt;br /&gt;
                     evaluation=&amp;quot;return (...):candidate_action_evaluation_hello2()&amp;quot;&lt;br /&gt;
                     execution=&amp;quot;(...):candidate_action_execution_hello2()&amp;quot;&lt;br /&gt;
                 [/candidate_action]&lt;br /&gt;
             [/stage]&lt;br /&gt;
Basically, we need to have an engine attribute, an evaluation and execution functions. The syntax (...):foo() means &amp;quot;call eng.foo(eng) where eng is whatever the engine code returns&amp;quot;. We can also add, remove, modify candidate actions on the fly, using wesnoth.wml_actions.modify_ai() functionality. Behavior(sticky) candidate actions use this approach.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Behavior(sticky) candidate actions ==&lt;br /&gt;
Sometimes we need a specific unit to do a specific action in our scenario, e.g. we want a scout unit to patrol between 3 places on the map, to provide us with visibility needed. In this case we can create a sticky candidate action that will tie itself to the unit, and remove itself when the unit has died. The syntax for defining a sticky candidate action is the following:&lt;br /&gt;
 [event]&lt;br /&gt;
 	name=side 2 turn 1&lt;br /&gt;
 	first_time_only=yes	&lt;br /&gt;
         [add_ai_behavior]&lt;br /&gt;
            side=2&lt;br /&gt;
            [filter]&lt;br /&gt;
                 name=&amp;quot;Rark&amp;quot;&lt;br /&gt;
            [/filter]&lt;br /&gt;
 	   sticky=yes&lt;br /&gt;
 	   loop_id=ca_loop&lt;br /&gt;
            evaluation=&amp;quot;return patrol_eval_rark()&amp;quot;&lt;br /&gt;
            execution=&amp;quot;patrol_rark()&amp;quot;&lt;br /&gt;
         [/add_ai_behavior]&lt;br /&gt;
 [/event]&lt;br /&gt;
Here the behavior CA is added to the configuration of the AI when the event triggers. Obviously this will happen when side 2 gets its first turn, but the event can be whatever needed. The definition is very similar to a simple candidate action, but here we also filter out a unit and state that we want the behavior to be sticky. If we don't, the action will not try to remove itself, when the unit gets killed, and this could cause errors.&amp;lt;br /&amp;gt;&lt;br /&gt;
Such CA`s can also be added from inside other CA or stage code using wesnoth.wml_actions.add_ai_behavior(cfg) function.&lt;br /&gt;
&lt;br /&gt;
== Behavior function library ==&lt;br /&gt;
Behaviors are defined using generators. A behavior generator receives arguments(unit info, configuration, etc) and returns a pair of functions: evaluator and executor. These functions are to be passed to the add_ai_behavior tag, or directly to the function.&lt;br /&gt;
=== Patrolling ===&lt;br /&gt;
The only behavior defined at the moment is the patrol behavior. After calling patrol_gen(name, locations), we receive a pair of functions to use for creation of candidate actions&amp;lt;br /&amp;gt;&lt;br /&gt;
Inclusion of the patrolling code: &lt;br /&gt;
 wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
Usage:&lt;br /&gt;
 local patrol_rark = patrol_gen(&amp;quot;Rark&amp;quot;, {{x=14, y=7}, {x=15, y=7}, {x=15, y=8}, {x=14, y=8}})&lt;br /&gt;
 -- patrol_rark.exec -- execution function&lt;br /&gt;
 -- patrol_rark.eval -- evaluation function&lt;br /&gt;
As you can see, the first argument is the name of the unit, the second is a table of coordinates of arbitrary length.&lt;br /&gt;
&lt;br /&gt;
==Goals and targets==&lt;br /&gt;
&lt;br /&gt;
When deciding what move to do next, the AI uses targets(markers on the map, pointing to villages, units, locations, etc). Targets are produced by goal objects. There are multiple predefined goal objects of different types in the C++ implementation, but now it is possible to define goal objects in Lua.&lt;br /&gt;
&lt;br /&gt;
 [goal]&lt;br /&gt;
 	name=lua_goal&lt;br /&gt;
 	value=6&lt;br /&gt;
 	engine=lua&lt;br /&gt;
 	code = &amp;lt;&amp;lt;&lt;br /&gt;
 		local t = {&lt;br /&gt;
 	 	    t[1] = {value=2.3, type=3, loc={x=5, y=6} }&lt;br /&gt;
 	 	    t[2] = {value=2.4, type=4, loc={x=4, y=16} }&lt;br /&gt;
  		}&lt;br /&gt;
  		return t&lt;br /&gt;
  	&amp;gt;&amp;gt;&lt;br /&gt;
 [/goal]&lt;br /&gt;
 &lt;br /&gt;
As you can see, the return value must be a table containing 0 or more targets. Each target must contain the three fields: &amp;quot;loc&amp;quot;, &amp;quot;type&amp;quot;, &amp;quot;value&amp;quot;. This code will then be parsed by the Lua engine and the targets will be available to use to any engine desired. To get the targets inside Lua, a simple &lt;br /&gt;
 local tg = ai.get_targets() &lt;br /&gt;
must be called. tg will contain a table of the same format, as one described in the goal definition code upper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Persistence ==&lt;br /&gt;
&lt;br /&gt;
If you need to store some data between save/load routines, you probably need a place to store the data. For this purpose, a field named &amp;quot;data&amp;quot; is automatically added to the return value of your engine code. The save routine will find this field, convert it to a config and store its content in readable format. When the scenario gets loaded back, the engine code will inject the data back in the AI context. All other data will be lost. Note that all content of &amp;quot;data&amp;quot; needs to be in WML table format, otherwise it will not be saved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debug access to the AI tree ==&lt;br /&gt;
&lt;br /&gt;
 wesnoth.debug_ai(side) &lt;br /&gt;
-- has been added. The function only works in debug mode and returns a table mimicking the side's AI component tree. Also allows the user to execute stages and evaluate/execute candidate actions.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46486</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46486"/>
		<updated>2012-04-16T20:54:47Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
UPDATE, April 11:&lt;br /&gt;
There seems to be a misunderstanding about this section. I will leave the previous version, so that no further confusion arises.&lt;br /&gt;
&lt;br /&gt;
What I am planning to document, is the whole AI system of Wesnoth, spending an hour on documentation work each evening. All the code that I am developing for my project will we documented at the moment I complete every part. That is, once I finish a new feature it will be documented immediately. Once I finish day working on the project, I will sit down to write the documentation for the current system, so that there is a single document describing the structure of the AI system and hints for starting developing for it, as well as, showcasing the possibilities of using the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Date&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Task&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Importance&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: tan&amp;quot;&amp;gt;In progress&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: Chartreuse&amp;quot;&amp;gt;Done&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: red&amp;quot;&amp;gt;Problematic/Won't be done&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
Update 12.04.12: Commit list.&lt;br /&gt;
These are a bunch of commits I've done, working on the LuaAI during the last 2 days&lt;br /&gt;
&lt;br /&gt;
r53888, r53901, r53902, r53903, r53907, r53908&lt;br /&gt;
&lt;br /&gt;
Update 16.04.12: Even more commits&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53936&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53940&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53945&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46399</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46399"/>
		<updated>2012-04-12T19:09:02Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
UPDATE, April 11:&lt;br /&gt;
There seems to be a misunderstanding about this section. I will leave the previous version, so that no further confusion arises.&lt;br /&gt;
&lt;br /&gt;
What I am planning to document, is the whole AI system of Wesnoth, spending an hour on documentation work each evening. All the code that I am developing for my project will we documented at the moment I complete every part. That is, once I finish a new feature it will be documented immediately. Once I finish day working on the project, I will sit down to write the documentation for the current system, so that there is a single document describing the structure of the AI system and hints for starting developing for it, as well as, showcasing the possibilities of using the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Date&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Task&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Importance&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: tan&amp;quot;&amp;gt;In progress&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: Chartreuse&amp;quot;&amp;gt;Done&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: red&amp;quot;&amp;gt;Problematic/Won't be done&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
Update 12.04.12: Commit list.&lt;br /&gt;
These are a bunch of commits I've done, working on the LuaAI during the last 2 days&lt;br /&gt;
&lt;br /&gt;
r53888, r53901, r53902, r53903, r53907, r53908&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46390</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46390"/>
		<updated>2012-04-11T16:31:11Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
UPDATE, April 11:&lt;br /&gt;
There seems to be a misunderstanding about this section. I will leave the previous version, so that no further confusion arises.&lt;br /&gt;
&lt;br /&gt;
What I am planning to document, is the whole AI system of Wesnoth, spending an hour on documentation work each evening. All the code that I am developing for my project will we documented at the moment I complete every part. That is, once I finish a new feature it will be documented immediately. Once I finish day working on the project, I will sit down to write the documentation for the current system, so that there is a single document describing the structure of the AI system and hints for starting developing for it, as well as, showcasing the possibilities of using the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Date&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Task&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Importance&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: tan&amp;quot;&amp;gt;In progress&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: Chartreuse&amp;quot;&amp;gt;Done&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: red&amp;quot;&amp;gt;Problematic/Won't be done&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46370</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46370"/>
		<updated>2012-04-09T23:01:13Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Date&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Task&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;b&amp;gt;Importance&amp;lt;/b&amp;gt;&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: tan&amp;quot;&amp;gt;In progress&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: Chartreuse&amp;quot;&amp;gt;Done&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: red&amp;quot;&amp;gt;Problematic/Won't be done&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46369</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46369"/>
		<updated>2012-04-09T22:59:02Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;tan&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP bgcolor=&amp;quot;Chartreuse&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: tan&amp;quot;&amp;gt;In progress&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: Chartreuse&amp;quot;&amp;gt;Done&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;background-color: red&amp;quot;&amp;gt;Problematic/Won't be done&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46368</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46368"/>
		<updated>2012-04-09T22:31:59Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46367</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46367"/>
		<updated>2012-04-09T22:31:25Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
Update 10.04.12: Exposed the attacks vector to LuaAI and provided a callback function to enable the LuaAI programmer to get the ratings of the attacks.&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53880&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53884&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46343</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46343"/>
		<updated>2012-04-09T00:08:51Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Update 08.04.12: First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update 09.04.12: Small refactoring of the move map structuring, when exposed to LuaAI&lt;br /&gt;
&lt;br /&gt;
http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53873&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46313</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46313"/>
		<updated>2012-04-08T00:17:01Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
First draft of the caching system for LuaAI&lt;br /&gt;
&lt;br /&gt;
Update 08.04.12: http://svn.gna.org/viewcvs/wesnoth?view=revision&amp;amp;revision=53846&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46189</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46189"/>
		<updated>2012-04-06T01:31:00Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(I always wanted to have my own campaign, but didn't want to use workarounds for more sophisticated story stuff. When the LuaAI will be done, things will get very easy)&lt;br /&gt;
* Depending on what AI summer project is chosen(recruiting, defense or campaign playing), I would like to work on the other parts. Of course that all depends on the activity of the students after the program finishes.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46186</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46186"/>
		<updated>2012-04-06T01:05:58Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
This is a first draft of the timeline. I will discuss it more with Crab_ once I see him.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have plans to work on Wesnoth after the end of the program. Last year these plans failed, because, besides my computing science courses, I had to take on 3 courses irrelevant to CS, and these courses turned out to be pure nightmare. 3rd year of University is the entrance to honours, there will only be computing science courses, which usually don't get me into trouble.&lt;br /&gt;
&lt;br /&gt;
Plans for after GSoC work:&lt;br /&gt;
* Writing &amp;quot;ideas&amp;quot; and &amp;quot;concepts&amp;quot; for the concept mechanism, strengthening the current AI with each one of them&lt;br /&gt;
* Creating a campaign, to showcase the power of LuaAI(just kidding, I always )&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46185</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46185"/>
		<updated>2012-04-06T00:59:54Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE WIDTH=100% BORDER=1 BORDERCOLOR=&amp;quot;#000000&amp;quot; CELLPADDING=4 CELLSPACING=0&amp;gt;&lt;br /&gt;
	&amp;lt;COL WIDTH=85*&amp;gt;&lt;br /&gt;
	&amp;lt;COL WIDTH=85*&amp;gt;&lt;br /&gt;
	&amp;lt;COL WIDTH=85*&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Date&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Task&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Importance&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; mid May&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exam session at University&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;&amp;lt;BR&amp;gt;&lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 1 - April 8&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Fixing minor issues and bugs, discussing the project with the&lt;br /&gt;
			mentors and potential users. Helping other students get a grip on&lt;br /&gt;
			the AI system.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(some bugs cause crashes and make LuaAI unusable)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 8 &amp;amp;ndash; April 10&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Caching system for LuaAI, to reduce inefficiency while&lt;br /&gt;
			translating heavy objects from C++ to Lua.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 10 &amp;amp;ndash; April 11&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposing the attack vector to LuaAI.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very High(users of LuaAI demand this crucial feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 11 &amp;amp;ndash; April 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Factoring out enemy attack calculation and exposing it to&lt;br /&gt;
			LuaAI. Might take more or less time, but shouldn't shift the&lt;br /&gt;
			timeline by more than one day.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;April 13 &amp;amp;ndash; April 14&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Possible exposure of LuaAI contexts to the global environment,&lt;br /&gt;
			for debug purposes&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Low(this is not yet discussed with the main AI developer)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid April &amp;amp;ndash; Mid June&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Exposure of the missing functionality to LuaAI. Will probably&lt;br /&gt;
			take less time, but I don't want to rush it. I will also have my&lt;br /&gt;
			exams during this time and will have to travel home in the&lt;br /&gt;
			beginning of June.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(since LuaAI is the future of AI development for Wesnoth,&lt;br /&gt;
			it must have all the power the C++ currently has).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Mid June &amp;amp;ndash; July 9&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;By mid June, LuaAI should have all the functionality C++ has(or&lt;br /&gt;
			at least the very commonly used and irreplaceable tools). Now the&lt;br /&gt;
			work shifts towards polishing the LuaAI development environment,&lt;br /&gt;
			finishing up the documentation and finalizing boilerplate code&lt;br /&gt;
			removal.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Very high(hopefully, after this step, LuaAI will be in very&lt;br /&gt;
			good shape and, in terms of usability, will be able to compete&lt;br /&gt;
			with C++). &lt;br /&gt;
			&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 9 &amp;amp;ndash; July 25&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on debugging tools and features.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(development is quite frustrating with no debugging tools)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;July 25 &amp;amp;ndash; August 13&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Work on the &amp;amp;ldquo;concept&amp;amp;rdquo; mechanism, the system that&lt;br /&gt;
			will provide a simple interface, so that any developer or even&lt;br /&gt;
			player, can make the AI stronger, by teaching it something new,&lt;br /&gt;
			using LuaAI scripts.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Medium(not yet properly discussed, but a desired feature)&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
	&amp;lt;TR VALIGN=TOP&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;August 13 &amp;amp;ndash; September 1&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;Completion of everything, that didn't get enough attention&lt;br /&gt;
			during the SoC period. By this time, bugs introduced in summer&lt;br /&gt;
			should be revealed. Fixing those bugs and polishing documentation.&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
		&amp;lt;TD WIDTH=33%&amp;gt;&lt;br /&gt;
			&amp;lt;P&amp;gt;High(in order to feel satisfied, I want everything to be done&lt;br /&gt;
			before autumn comes and ruins all my AI improvement plans, with&lt;br /&gt;
			impossible to bear University workload).&amp;lt;/P&amp;gt;&lt;br /&gt;
		&amp;lt;/TD&amp;gt;&lt;br /&gt;
	&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46091</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46091"/>
		<updated>2012-04-04T16:28:37Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;The future of Wesnoth artificial intelligence&amp;lt;/h4&amp;gt;&lt;br /&gt;
My vision of the future Wesnoth AI relies on the quality of the LuaAI engine and the general AI improvements. We will have a smart AI that will have a new stage before the RCA_loop, that will analyze the current situation and if it's appropriate, use tricks to gain profit and capitalize on it's advantages.&lt;br /&gt;
The stage could look like this(very high level pseudocode, illustrates only the situation with the luring concept):&lt;br /&gt;
  analysis stage {&lt;br /&gt;
   // parts omitted&lt;br /&gt;
 &lt;br /&gt;
   for (concept in concepts) do					// concepts is a list of known tricks&lt;br /&gt;
 		if(concept.analyse_if_possible()) {		// check if we can execute a trick, lure for example&lt;br /&gt;
 			concept.prepare()			// find the units that can participate &lt;br /&gt;
 			concept.setup()				// create the needed candidate actions&lt;br /&gt;
 		}		   &lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   // parts omitted&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, when the RCA starts its work, there will be candidate actions that will execute the luring, and, hopefully, the AI will kill a couple of warriors, who chased the poor scout in to the shroud.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;concepts&amp;quot; will be generated from a list of developer approved concepts(e.g. lure, chase, patrol, flee, suicide, scatter, etc, etc, etc). A concept will have to implement an interface(actually, Lua doesn't have interfaces, but lets say it does, so my text looks smarter) consisting of methods &amp;quot;analyse_if_possible&amp;quot;, &amp;quot;prepare&amp;quot;, &amp;quot;setup&amp;quot;. The setup will generate predefined candidate actions and add them to the RCA. This is why I think that polishing and completing the LuaAI is so important. That will allow people to make the AI stronger, not being scared off by the sophisticated C++ coding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Thanks&amp;lt;/h4&amp;gt;&lt;br /&gt;
for your time and attention.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46090</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46090"/>
		<updated>2012-04-04T16:05:55Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
This is a small chat excerpt of a conversation I had earlier today(April 4th). It might provide more insight on my vision and ideas.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
Generally, I think it's important to improve both sides: general AI and customization abilities. In combination, the AI will not only be able to play smart in general, but will have the ability to use tricks that humans invent, bringing the AI player closer to an actual human player, making the game more fun, more challenging and less predictable. &lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46089</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46089"/>
		<updated>2012-04-04T16:01:16Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper: ok, another idea then. Is scenario designer able to force certain ratios or fixed numbers and kinds of unit to achieve certain goals? Simplest example - force always using at least 50% of blue force move toward red keep, leaving only at most 50% to attack green keep? More complex - player side takes part in a battle, where entire sections of friendlies and enemies have fixed behavior on general scope, but specific mo&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; cut off at &amp;quot;but specific mov&amp;quot;&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ...es are and attackes are determined by default ai.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Example of handle - set travel point for all red units in certain area1 to area2 at priority level medium - makes the ai favor moves that cause affected units to move toward area2&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, if I understand you correctly, then yes, there is a way to do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro how does that work at the moment?&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, i'm not really an AI expert, but i don't think so. i think you can make the AI units execute certain moves if the specified conditions are true, but i don't think you can (easily) make it work like you described.&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; zookeeper, and that would be helpful for scenario designers wouldn't it?&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; well, you write a candidate action for that, and make it very high priority(higher than the standard movement candidate action). Since the task is not too common, you will probably want to write such a candidate action in Lua and add it to the rca_loop on the fly. You can also place the candidate action in the Lua library(not yet defined, but soon will be), therefore other people will be able to reuse it&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, but better ask crab or someone who really knows what they're talking about&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; i just bother you guys because crab is not here, and I try to use the little time i have before filing application best way possible&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; e7th04sh, it'd depend on how exactly it'd work and if it'd be easy to use&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; well it would require to pass orders to ai code&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; so that would be only usable with compatible ai&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; ok, i have to go again. i'll try to describe it better when i'm back&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; as for the example with  &amp;quot; force certain ratios or fixed numbers and kinds of unit to achieve certain goals&amp;quot;... You make a stage before the rca_loop that will  analyze and split your units into groups, then the appropriate CA's do the job&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; very simple&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; LuaAI has an object for static data, so CA's can communicate&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I don't think C++ can do that&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; Nephro but do you see a general reusable solution here, or rather you see that doing this on a case by case basis is easy?&lt;br /&gt;
 &amp;lt;e7th04sh&amp;gt; I'm not sure how easy or hard is what you describe. I want to reach out to more people, so they can make better campaigns with simpler tools.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; the thing is that AI customization tends to get really difficult really fast&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, once you do something, you store it in the library, so it's reusable. You can't generally define one way for the AI to be able to do different things&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e7th04sh, what you are suggesting is the &amp;quot;idea concept&amp;quot;... You have to teach the AI the idea at least once, before it can reuse it infinitely&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; the framework for that is already functioning, it only needs polishing&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; ...therefore, the #1 most useful thing would usually be to just make the AI play better ;) after the AI learns to play better, the scenario designer can affect its behaviour by giving it different units, for instance&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; e.g. I have implemented a patrolling concept for the units. Right now, you can make any unit you want, to patrol the map on certain waypoints.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I even think this function is used in one of the mainline campaigns&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, as I see this problem: the campaign games usually fully depend on customization, while single games(where the player just plays against an AI on a symmetric map with the same starting set), don't need any customization at all.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, if we make the current AI play better, and maybe even play smart, I think some campaigns will become impossible to complete, then we would have to restrict the skills of the AI&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, the way i see it is that if we had an AI that could play really well, then we wouldn't need much more than to be able to give it _objectives_. the rest would be up to the units, gold etc that the scenario designer gives it. sure some customization like patrolling is nice, but generally i think most customization is a reaction to the AI playing poorly without them.&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, well, I agree with that. But imagine a scenario where we need to clear a map from all kinds of evil things. We start out with a small force, but the whole map is infested with monsters. A smart AI would instantly send everything to kill you and would succeed. The story concept requires the AI to behave in very certain ways&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the human mind is capable of generating tricky stuff, like luring, for example. I see absolutely no way of making the AI so good, that it would decide to lure someone. But we can certainly teach it, that in certain situations, we can activate the custom lure concept, and try to pull it off&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, well, improving the AI wouldn't change such a clear-the-map scenario&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, no, I meant, a smart non-customized AI wouldn't stand and wait if you don't tell it to.&lt;br /&gt;
 &amp;lt;zookeeper&amp;gt; Nephro, sure. customization for scenarios like that has and always will be needed&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, also, the AIs of strategic will always have a brick wall in front of it in the means of complexity&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; strategic games*&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; zookeeper, I also think, that both, improving the AI in general and improving the ability to customize should be run in parallel. The customizers can create a variety of scripts that can be used as weapons by the ai, and the general ai should know, when and how to use these weapons&lt;br /&gt;
 &amp;lt;Nephro&amp;gt; I think that's the way to go&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46088</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46088"/>
		<updated>2012-04-04T15:55:51Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Importance&amp;lt;/h4&amp;gt;&lt;br /&gt;
I see the LuaAI as a very important part of future AI development for Wesnoth. It will help expand the current AI and teach it new tricks very easily. While improving the current AI in general will surely make it stronger, small LuaAI snippets will allow it to become more clever and use all kinds of trickery, where it's appropriate.&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46085</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46085"/>
		<updated>2012-04-04T14:11:29Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
       local ai = ...&lt;br /&gt;
       local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
       ai_stdlib.init(ai)&lt;br /&gt;
       my_ai = {}&lt;br /&gt;
       !-- set up functions of my_ai here&lt;br /&gt;
       return my_ai&lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
There's even more to do, if you want to set up your own candidate actions and stages. That is obviously too many things to do, each time you start creating a scenario or just a LuaAI player. Also, the code in the preload template exposes variables that shouldn't be modified by the user(also these variables may cause bugs in the way they are right now, eg ca_counter shouldn't always be 0, that is a error I introduced to the code and I will fix it).&lt;br /&gt;
What I will be working towards, should look like this:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
We can shorten this even more, with macros, for example, or make the C++ side add this section for us, if we omit it. The need to define the preload event should be completely removed, this is something the machine can and should do instead of us.&lt;br /&gt;
&amp;lt;h4&amp;gt;LuaAI element management&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now, the management of the AI elements is completely manual, which isn't good in my opinion. If we let our computers do that for us, we can't make mistakes while doing that.&amp;lt;br&amp;gt;&lt;br /&gt;
Lets create a small candidate action:&lt;br /&gt;
 function my_ai:candidate_action_evaluation()&lt;br /&gt;
 	local score = long_complicated_formula()&lt;br /&gt;
 	&lt;br /&gt;
        return score&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function my_ai:candidate_action_execution()&lt;br /&gt;
        wesnoth.message(&amp;quot;LuaAI&amp;quot;, &amp;quot;I win!&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
(note: this code goes into the engine attribute of the LuaAI definition)&lt;br /&gt;
To make this trivial candidate action work, our steps would be:&lt;br /&gt;
&lt;br /&gt;
 [stage]&lt;br /&gt;
     name=testing_ai_default::candidate_action_evaluation_loop&lt;br /&gt;
     id=ca_loop               &lt;br /&gt;
     [candidate_action]&lt;br /&gt;
         engine=lua&lt;br /&gt;
         name=candidate_action&lt;br /&gt;
         evaluation=&amp;quot;return (...):candidate_action_evaluation()&amp;quot;&lt;br /&gt;
         execution=&amp;quot;(...):candidate_action_execution()&amp;quot; &lt;br /&gt;
     [/candidate_action]&lt;br /&gt;
 [/stage]&lt;br /&gt;
&lt;br /&gt;
Again, this is too much to do, to set up a small candidate action. I have two ideas here: (1) we force the developer to name his functions in a certain format(e.g. &amp;lt;name&amp;gt;_eval and &amp;lt;name&amp;gt;_exec) and analyze the code to extract these pairs and add them automatically; (2) we leave markers in the Lua code, that will be gathered by the preprocessor and then do the automation.&amp;lt;br&amp;gt;&lt;br /&gt;
There are several ways of doing this task, but the most important part is the automation framework. Once it is done, we can choose different paths or even implement more than one way.&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46084</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46084"/>
		<updated>2012-04-04T13:49:56Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
   local ai = ...&lt;br /&gt;
   local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
   ai_stdlib.init(ai)&lt;br /&gt;
   my_ai = {}&lt;br /&gt;
   !-- set up functions of my_ai here&lt;br /&gt;
   return my_ai&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46083</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46083"/>
		<updated>2012-04-04T13:49:27Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
   local ai = ...&lt;br /&gt;
   local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
   ai_stdlib.init(ai)&lt;br /&gt;
   my_ai = {}&lt;br /&gt;
   !-- set up functions of my_ai here&lt;br /&gt;
   return my_ai&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46082</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46082"/>
		<updated>2012-04-04T13:48:34Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
   local ai = ...&lt;br /&gt;
   local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
   ai_stdlib.init(ai)&lt;br /&gt;
   my_ai = {}&lt;br /&gt;
   !-- set up functions of my_ai here&lt;br /&gt;
   return my_ai&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
This is the absolute minimum at the moment. There is even more code to be written to actually make LuaAI &amp;lt;u&amp;gt;able&amp;lt;/u&amp;gt; to do something useful. For example, you won't be able to use lots of tools and features of the current LuaAI system if you don't add this preload event:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             W = H.set_wml_action_metatable {}&lt;br /&gt;
             _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;  &lt;br /&gt;
 	    ai = {}&lt;br /&gt;
 	    ca_counter = 0&lt;br /&gt;
 		&lt;br /&gt;
             H.set_wml_var_metatable(_G)&lt;br /&gt;
&lt;br /&gt;
 	    wesnoth.require(&amp;quot;ai/lua/patrol.lua&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 	    &amp;gt;&amp;gt;&lt;br /&gt;
 	[/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46081</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46081"/>
		<updated>2012-04-04T13:45:11Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Before and after&amp;lt;/h4&amp;gt;&lt;br /&gt;
Before:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt;&lt;br /&gt;
   local ai = ...&lt;br /&gt;
   local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua');&lt;br /&gt;
   ai_stdlib.init(ai)&lt;br /&gt;
   my_ai = {}&lt;br /&gt;
   !-- set up functions of my_ai here&lt;br /&gt;
   return my_ai&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
After:&lt;br /&gt;
 [engine]&lt;br /&gt;
   name=&amp;quot;lua&amp;quot;&lt;br /&gt;
   code= &amp;lt;&amp;lt; &lt;br /&gt;
   &amp;gt;&amp;gt;&lt;br /&gt;
 [/engine]&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46078</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46078"/>
		<updated>2012-04-04T13:05:46Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
Right now I am working on a caching system for LuaAI. It will be very simple, yet powerful. All of the getters(get_attacks, get_dstsrc, etc) will not call C++ directly. Instead, these functions will make a call to a proxy function, which will keep a cache table and will request object retranslation only in the cases, when the objects kept in the cache get invalidated. &amp;lt;br&amp;gt;This really needs to be done, because some CA's in the loop might get evaluated and executed more than once in one turn, that leads to multiple expensive C++ to Lua conversions of the very same object. And what if we have 10 CA's in a loop and the object doesn't change? We are talking about hundreds, maybe even a thousand conversion instead of one. The cache system will be able to take care of that.&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46077</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46077"/>
		<updated>2012-04-04T12:53:45Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* The secondary goal, but not less important, is to provide some kind of a debugging interface, for the LuaAI devs. I am not quite sure, how much time will I have for this, but certain in-game GUI overlays, displaying the workflow and results of the LuaAI engine code, ca's and stages are, most certainly, top priority. &lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
As far as I know, documentation of code is not part of the GSoC program, but I decided, that I will spend at least one hour every day in the evenings, to create documentation for the whole AI system(except if I run short on time again, then I am going to focus on my project more). From my experience last year, I know, how much a UML diagram would've helped, when dealing with the composite AI system, that combines several design patterns and is not easy to comprehend at first, due to its size.&lt;br /&gt;
Of course, each peace of code produced by myself, will also be documented properly, no matter what. I also got pointed out, that I left some of my previous code undocumented, so that will be handled asap too.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46076</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46076"/>
		<updated>2012-04-04T12:43:18Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
* Lack of documentation(the lack of documentation will partially resolve, once LuaAI will be cleaned from the boilerplate code, there will simply be less things to document)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
* The main goal of the project is to make the LuaAI a fully functional, safe, stable and most importantly simple to use AI development environment. I don't even need to mention, that it shouldn't have any bugs at all, the known ones must be fixed as soon as possible, the unknown ones must be discovered. &lt;br /&gt;
* &lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46075</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46075"/>
		<updated>2012-04-04T12:35:32Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* LuaAI lacks a lot of tools C++ has(e.g. the attacks and enemy_attacks vectors)&lt;br /&gt;
* Some heavyweight objects are currently being inefficiently handled by the LuaAI(e.g. the translation of move maps and any container type objects, that are getting passed to LuaAI)&lt;br /&gt;
* Users of LuaAI have discovered bugs in the current implementation(some of them already fixed by me, some fixes are planned)&lt;br /&gt;
* Boilerplate code in the scenarios(discussed lower in the &amp;quot;Boilerplate code&amp;quot; section)&lt;br /&gt;
* Lack of error handling and debugging tools(e.g. if you make an error in your LuaAI engine code, the game will just crash)&lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46073</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46073"/>
		<updated>2012-04-04T12:28:32Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
&amp;lt;h4&amp;gt;Intro&amp;lt;/h4&amp;gt;&lt;br /&gt;
As I already stated in the short description, the LuaAI system is not very easy to use, at this stage. We can say the same about the C++ part of the AI, if a person wants a new candidate action, for example, he will have to dig in the C++ code, understand, how it works, code in C++, compile, debug. That is the way of C++, but shouldn't be the way of LuaAI.&amp;lt;br&amp;gt;&lt;br /&gt;
LuaAI was designed to simplify AI development, to provide a way of trying out their ideas for non-programmers. If we design a usable and simple LuaAI environment, even the further development of the current mainline AI would be simplified. Stages and candidate actions could just be written and tried out in Lua, and if a developer is satisfied with its work, he can either leave the AI element in the Lua form and add it to the main RCA loop, or translate it to C++ and compile &amp;lt;u&amp;gt;once&amp;lt;/u&amp;gt;. The translation must be trivial, considering that LuaAI was properly prepared. LuaAI should provide all the power that C++ has.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Known problems&amp;lt;/h4&amp;gt;&lt;br /&gt;
* &lt;br /&gt;
&amp;lt;h4&amp;gt;Goals&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Work in progress&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Documentation&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
=SoC Application=&lt;br /&gt;
Submitted to google&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46061</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46061"/>
		<updated>2012-04-03T20:37:55Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
Under construction, I plan to post it in the evening of April 3rd(Europe time)&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I participated in lots of programming contests before going to University. Therefore, I have experiences in writing &amp;quot;one algorithm programs&amp;quot;(contest program that solves a particular mathematical or algorithmic problem), high speed development(in contests, where we had to write up an app in a matter of hours) and some tricky stuff(for contests that tested skills in creating systems from several unrelated parts, not only programming). I've also spent two summers working in a small company, once expanding the functionality of a social network and once developing a server side for a browser based game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have been working in a team environment for two summers, in the company I told in (2.1). Also, several contests were also team-based, I was working with very gifted people and together we managed to win a couple of trophies. I also consider my last summer project for GSoC with Wesnoth a teamwork experience, since I wasn't developing quite what I wanted, but rather, what we discussed to presumably be good beforehand. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have participated in GSoC 2011 for Wesnoth as a student. The project was about expanding the functionality of LuaAI and improving the AI system in general. Although I've seemed to have passed all the milestones for Google and was successful in a program, I am not quite happy about myself. I had a good idea that the organizers liked too, but before I could tackle the implementation of it, I needed to complete a compulsory part. It took  me much longer than it should have, I kept constantly stumbling on weird errors, bugs, sometimes I implemented the wrong designs and had to redo. In the end, I didn't even touch my own idea, because the summer ended faster than I expected.&amp;lt;br&amp;gt;&lt;br /&gt;
I think the big mistake there, was overestimating my own abilities. I also didn't evaluate the amount of compulsory work correctly, thinking it's mostly straightforward and I won't encounter any problems along the way.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am currently a developer for Battle for Wesnoth. I tried to engage in other OSS projects, but University workload didn't give me a chance to do that.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wouldn't call myself a gamer, I don't like that word. But I really like playing qualitative games, but recently I had no time to play a lot myself, so I became more of a spectator, watching professional players play on the global competitive scene.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
I started out like most of us, playing classic games on an old pc. When I first got a good and powerful PC, I met people, who involved me in our regional competitive scene. From that point I played less and less single player and moved to competitive multiplayer. At this point, I don't play single player games at all, they just don't give me the challenge, that I need, anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
I am a big fan of the MOBA(Multiplayer online battle arena) genre, it is getting very popular in the world, even starting to push the grands like Counter-Strike and Starcraft aside. I also enjoy watching a good match of Starcraft 2 once in a while and really respect the talented players of that game.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
Lately, the criteria for both, teammates and opponents, are skill level, mental capabilities and age. It's not that I don't like young people, they just more often don't care about the game. On a typical day, I would usually not care about games too, but if I find time to sit down and play, I want to gain maximum experience during that time and I need the people playing with and against me taking it all seriously.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
When I play a game, I always analyze the interesting parts of it. A great game must find the perfect balance between both, but my mind is usually oriented on the engineering aspects, such as game dynamics, gameplay mechanics and the flexibility of the game engine. This gives me a way of comparing different games and finding the most enjoyable one.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
I have played wesnoth during school years. I lived 50 km from my school and traveled 2 hours by train everyday. It wasn't so tough, because I had my laptop and some good games on it, one of which was Wesnoth. We played it both, SP and MP on the same machine. I also played a lot of wesnoth last year, when I lived in a flat with no internet, that was probably the time when I have completed most of the scenarios.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
I am developer of Wesnoth and have quite a few commits listed on my name. The latest ones are only small bugfixes. Right now I am working on a bigger and more interesting, so I'll probably link to it when it's done.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I study in the UK, so English isn't a problem for me. I received a band of 7.5 in the IELTS test, which is considered very good.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I am a native Russian speaker, but was born in Latvia. These are the two languages besides English, that I use almost on a daily basis(not too much Latvians here in Scotland, but there are a couple).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I had absolutely no interaction with the player community last year, and I doubt that I will encounter such a need this year, due to the specifics of my project, but I can assure you, that I am used to dealing with all kinds of behavior, and am pretty good at settling things down, if the situation becomes less friendly than it is needed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Can't judge myself, but I try to always back my words up by constructive arguments.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes, as long as the person, who gives the advice, clearly explains the reasoning. If I hear phrases like &amp;quot;Just do it that way, because it's the right way&amp;quot;, I won't immediately ignore that, but will try to find reasoning elsewhere, if the author isn't too constructive about it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I think I am. I developed these skills thanks to one of my hobbies: music production. I like to have a go in my digital audio workstation once in a while, just for fun, and I sometimes post things on forums. I usually hear a lot there, but only 10% usually makes sense to me. I've never actually encountered inappropriate criticisms while working on wesnoth. People always have a point, when they ping me out in IRC and ask to fix something I screwed up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I used the &amp;quot;see how it turns out&amp;quot; method when I was younger, it got clear to me pretty fast, that I won't get far this way. In the pre-GSoC period last year, I didn't discuss my changes to the code enough, and ended up redoing a very big block of code almost from scratch. Since then I've explored the current design more deeply, and my ideas now seem to be closer to the ideas of the senior devs, but I usually still ask questions about the design, before starting, to save the time of myself and the person I am asking. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I chose the &amp;quot;AI: Make lua AI development and usage easier&amp;quot;. The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
-&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The choice is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timeline will be provided in the Timeline section of this wiki page.&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The project is described in more detail in the Project section of this wiki page.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Experience, implementation skills and most importantly - confidence.&amp;lt;br&amp;gt;&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Wesnoth community is great as it is. I don't see a single change needed to be done. I became inactive for almost a year, only due to the University workload, which caught me off guard this year.&amp;lt;br&amp;gt; The people are all friendly, helpful and very competent. While I was here, I got help on so many things besides the game itself: design patterns, C++ help, Lua help, overall game development process and so much more. This community is a very great place, where people can learn in a fun way, not investing a penny.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46059</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46059"/>
		<updated>2012-04-03T19:31:26Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
Under construction, I plan to post it in the evening of April 3rd(Europe time)&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46058</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46058"/>
		<updated>2012-04-03T19:30:24Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
Under construction, I plan to post it in the evening of April 3rd(Europe time)&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;2) Experience&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;3) Communication skills&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;4) Project&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;5) Practical considerations&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
I have been using the three technologies listed above quite extensively for Wesnoth development during last summer. &lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
Python is the language used in our University during first year computing courses, so I am quite agile with it.&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
I use cmake for my wesnoth builds and try not to forget add new files to other build system config files.&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
Used both WML and Lua during my project last summer.&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
While working on Wesnoth, I usually use KDevelop and Subversion(cli). KDevelop provides me with a neat and comfortable development environment, it has decent autocompletion, code checking and never causes problems for me. Also, wesnoth has a project file for this IDE, so I don't have to worry about more technical, not related to my actual tasks, things. &amp;lt;br&amp;gt;&lt;br /&gt;
Subversion is, of course, the version control system that wesnoth generally uses, it also suits my needs, and I am not even considering switching to something else at the moment.&amp;lt;br&amp;gt;&lt;br /&gt;
For university work, we are forced to use Eclipse for most of the development, some other custom IDEs for processor/chip programming and IDLE for Python scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
Languages relevant to BfW: C/C++/Lua, + basic WML I might require during testing, documentation and demonstration of features I'm working on.&amp;lt;br&amp;gt;&lt;br /&gt;
Experiences irrelevant to the project:&amp;lt;br&amp;gt;&lt;br /&gt;
 PHP/MySql - moderate level, used it once for professional development&lt;br /&gt;
 Java/Python - Languages I use for university and take courses in&lt;br /&gt;
 C#/Monodevelop - used once for professional development and a couple of times for contest programming&lt;br /&gt;
 Pascal - used quite a lot for contest programming and algorithm studies, when I was younger.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No problems with talking on the phone. I will provide my telephone number and my skype ID later.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46049</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46049"/>
		<updated>2012-04-03T04:52:08Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
=The project=&lt;br /&gt;
Under construction, I plan to post it in the evening of April 3rd(Europe time)&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46048</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46048"/>
		<updated>2012-04-03T04:32:31Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;1) Basics&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.1) Write a small introduction to yourself.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.2) State your preferred email address.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.4) Why do you want to participate in summer of code?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.5) What are you studying, subject, level and school?&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.1) What programs/software have you worked on before?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.5) Gaming experience - Are you a gamer?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.2) What spoken languages are you fluent in?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.4) Do you give constructive advice? &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.5) Do you receive advice well? &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.6) Are you good at sorting useful criticisms from useless ones?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.2) If you have invented your own project, please describe the project and the scope.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.3) Why did you choose this project?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.5) Include as much technical detail about your implementation as you can&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;4.6) What do you expect to gain from this project?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.1) Are you familiar with any of the following tools or languages?&amp;lt;/b&amp;gt;&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.2) Which tools do you normally use for development? Why do you use them?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.3) What programming languages are you fluent in?&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46047</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46047"/>
		<updated>2012-04-03T04:19:45Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1) Basics&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&amp;lt;br&amp;gt;&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&amp;lt;br&amp;gt;&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&amp;lt;br&amp;gt;&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&amp;lt;br&amp;gt;&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&amp;lt;br&amp;gt;&lt;br /&gt;
I can't even compare the experience gained working on this project with a mentor to anything else. The large sophisticated codebase, working with other people directly, designing for long term, milestones(which I like to consider deadlines), it all allows to immerse in gamedev, while not applying too much pressure, like corporate development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &amp;lt;br&amp;gt;&lt;br /&gt;
Computing Science, year 2&amp;lt;br&amp;gt;&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&amp;lt;br&amp;gt;&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&amp;lt;br&amp;gt;&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46046</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46046"/>
		<updated>2012-04-03T04:14:00Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Questionnaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Off topic: I did this questionnaire last year, but I don't remember what I wrote in it. I won't look on purpose, until I complete this one, and try to see, whether I've changed at all...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;1) Basics&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
Hi, my name is Dmitry Kovalenko and I am aspiring software developer. I've been interested in sciences and engineering since about 5th grade, about that time, I got my first PC without and, without any internet, started to hack around it. It was old and semi-broken, but I got it to run Windows 95 and was very proud of myself. I played a lot of games on it, despite the fact that my games were 10 years older than the games of my classmates, and one day, I decided to write my own game, which would combine the brilliance of my favorite games, lacking their flaws. I failed, of course, at the very first steps, but those were also the first steps towards the career I am pursuing now, 5 years later.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
nephro dot wes at gmail dot com&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
Nephro on irc.freenode.com and Nephro in the forums&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
Last year, it was all about proving to myself that I can get accepted and make it through. This year it's exactly the same, only to add the word &amp;quot;again&amp;quot; to the previous sentence.&lt;br /&gt;
To be honest, I was very disappointed in my performance last year. I was slow, inefficient, imprecise(left a fair amount of bugs after myself) and a bit unorganized. This year I want it to be good, like it should be.&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
Computing Science, year 2&lt;br /&gt;
University of Glasgow, Glasgow, Scotland, UK&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
Right now I reside in Scotland, but will, most probably, live in Latvia during the summer.&lt;br /&gt;
I am usually online during the working day time in Europe and most of the evenings.&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
I have no commitments during this summer, except for maybe rare sports matches, but they usually take place on the weekends, so will not affect my workflow.&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46045</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46045"/>
		<updated>2012-04-03T03:54:16Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code(not even mentioning the bugs that he will encounter on the way). While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46044</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46044"/>
		<updated>2012-04-03T03:52:27Z</updated>

		<summary type="html">&lt;p&gt;Nephro: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code. While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46043</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46043"/>
		<updated>2012-04-03T03:51:44Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Simplify LuaAI&amp;lt;/u&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code. While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46042</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46042"/>
		<updated>2012-04-03T03:50:54Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
==Simplify LuaAI==&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code. While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46041</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46041"/>
		<updated>2012-04-03T03:49:52Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Simplify LuaAI&amp;lt;/h3&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code. While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46040</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46040"/>
		<updated>2012-04-03T03:47:05Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h5&amp;gt;Simplify LuaAI&amp;lt;/h5&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code. While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46039</id>
		<title>SoC2012 Nephro</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SoC2012_Nephro&amp;diff=46039"/>
		<updated>2012-04-03T03:46:22Z</updated>

		<summary type="html">&lt;p&gt;Nephro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2012Student}}&lt;br /&gt;
[[Category:SoC_Ideas_AI_Lua_AI_Usage_2012]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Dmitry Kovalenko(Nephro) - Further Lua&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Simplify LuaAI&amp;lt;/h3&amp;gt;&lt;br /&gt;
Right now, the LuaAI system is in a state, where it can be used for artificial intelligence system development for Battle for Wesnoth campaigns, but it's usage is quite complicated and requires effort to get the system off the ground and make it run. To simply to launch a campaign with an empty LuaAI(by empty, I mean, not doing anything) a UMC developer is required to write a couple dozens of lines of code. While it seems, that we could simply hide the boilerplate code in a template or behind a macro, the situation is a bit more sophisticated(Later I will describe that in more detail). Instead of running away from this problem, I will work towards an elegant solution, creating an effective back-end system, and a clean user development environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
Nephro, neph&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
1) Basics&lt;br /&gt;
&lt;br /&gt;
1.1) Write a small introduction to yourself.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school? &lt;br /&gt;
&lt;br /&gt;
1.6) What country are you from, at what time are you most likely to be able to join IRC?&lt;br /&gt;
&lt;br /&gt;
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Experience&lt;br /&gt;
&lt;br /&gt;
2.1) What programs/software have you worked on before?&lt;br /&gt;
&lt;br /&gt;
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)&lt;br /&gt;
&lt;br /&gt;
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?&lt;br /&gt;
&lt;br /&gt;
2.4) 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;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games? &lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.&lt;br /&gt;
&lt;br /&gt;
We do not plan to favor Wesnoth players as such, but some particular projects require a good feeling for the game which is hard to get without having played intensively.&lt;br /&gt;
&lt;br /&gt;
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Communication skills&lt;br /&gt;
&lt;br /&gt;
3.1) Though most of our developers are not native English speakers, English is the project's working language.  Describe your fluency level in written English.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.3) 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;
&lt;br /&gt;
3.4) Do you give constructive advice? &lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well? &lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to &amp;quot;see how it turn out&amp;quot;, taking the risk of having it thrown away if it doesn't match what the project want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Project&lt;br /&gt;
&lt;br /&gt;
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?&lt;br /&gt;
&lt;br /&gt;
4.2) If you have invented your own project, please describe the project and the scope.&lt;br /&gt;
&lt;br /&gt;
4.3) Why did you choose this project?&lt;br /&gt;
&lt;br /&gt;
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like &amp;quot;I booked holidays between A and B&amp;quot; and &amp;quot;I got an exam at ABC and won't be doing much then&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4.5) Include as much technical detail about your implementation as you can&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Practical considerations&lt;br /&gt;
&lt;br /&gt;
5.1) Are you familiar with any of the following tools or languages?&lt;br /&gt;
* Subversion (used for all commits)&lt;br /&gt;
* C++ (language used for all the normal source code)&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth)&lt;br /&gt;
* Python (optional, mainly used for tools)&lt;br /&gt;
* build environments (eg cmake/scons)&lt;br /&gt;
* WML (the wesnoth specific scenario language)&lt;br /&gt;
* Lua (used in combination with WML to create scenarios)&lt;br /&gt;
&lt;br /&gt;
5.2) Which tools do you normally use for development? Why do you use them?&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of &amp;quot;there is no way to contact you&amp;quot; does arise!&lt;br /&gt;
&lt;br /&gt;
In general, students should be as verbose as possible in their answers and feel free to elaborate.&lt;/div&gt;</summary>
		<author><name>Nephro</name></author>
		
	</entry>
</feed>