<?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=Jleldridge</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=Jleldridge"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Jleldridge"/>
	<updated>2026-04-14T15:13:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51152</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51152"/>
		<updated>2013-05-22T22:31:39Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Demo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=Demo=&lt;br /&gt;
&lt;br /&gt;
I put together a Micro AI to demonstrate the kind of formation I have in mind to defend a specific area, in this case, the area around a village. The scenario I used to test the Micro AI is a modification of the one used to demonstrate the healer support Micro AI, and consists of two sides: the red total defense Micro AI in the north and the blue healer support Micro AI in the south. I chose to pit the total defense AI against the healer support AI because it generally uses the standard RCA AI candidate action loop, but uses healers a bit more intelligently.&lt;br /&gt;
&lt;br /&gt;
In the scenario, I'm having the total defense Micro AI defend the area around the village just north of the river in the center of the map by positioning uninjured, non-healer units on the outside of the area facing the enemy, and injured or healer units on the inside just behind the defender line. Units that fall under 50% hp are considered &amp;quot;injured&amp;quot; and will fall back to the interior of the defense radius.&lt;br /&gt;
&lt;br /&gt;
I also ran this scenario with just two healer support Micro AIs pitted against each other, with the northern team assigned a &amp;quot;protect_area&amp;quot; goal centered around the same village with a radius of 5 for comparison with the total defense Micro AI. In both scenarios the northern (defending) team was forced to stop recruiting after turn 4, so that the southern team would eventually overwhelm the northern team with the idea being to see how long each AI could keep the opponent from capturing the defended village. The performance of my total defense Micro AI in comparison to a simple protect_area goal was somewhat underwhelming. The team in general would last about the same amount of turns as the protect_area AI, though it is worth noting that the total defense Micro AI would never lose control of the village, while the protect_area AI would. Generally the leader would die due to not being a part of the defensive structure around the village in the total defense AI.&lt;br /&gt;
&lt;br /&gt;
Included here is a picture of the formation created by the total defense Micro AI around the villiage it is assigned to defend:&lt;br /&gt;
https://github.com/jleldridge/wesnoth-old/blob/totaldefensedemo/&lt;br /&gt;
the file is at the bottom of that directory:&lt;br /&gt;
total_defense_of_village.png&lt;br /&gt;
&lt;br /&gt;
Here is the commit for the demo. Every commit I made during the demo has been rebased into a single commit so that the related file diffs can be more easily viewed: https://github.com/jleldridge/wesnoth-old/commit/bb478407e29003a930a4cd395018adc7f36aa7c2&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51151</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51151"/>
		<updated>2013-05-22T22:30:31Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Demo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=Demo=&lt;br /&gt;
&lt;br /&gt;
I put together a Micro AI to demonstrate the kind of formation I have in mind to defend a specific area, in this case, the area around a village. The scenario I used to test the Micro AI is a modification of the one used to demonstrate the healer support Micro AI, and consists of two sides: the red total defense Micro AI in the north and the blue healer support Micro AI in the south. I chose to pit the total defense AI against the healer support AI because it generally uses the standard RCA AI candidate action loop, but uses healers a bit more intelligently.&lt;br /&gt;
&lt;br /&gt;
In the scenario, I'm having the total defense Micro AI defend the area around the village just north of the river in the center of the map by positioning uninjured, non-healer units on the outside of the area facing the enemy, and injured or healer units on the inside just behind the defender line. Units that fall under 50% hp are considered &amp;quot;injured&amp;quot; and will fall back to the interior of the defense radius.&lt;br /&gt;
&lt;br /&gt;
I also ran this scenario with just two healer support Micro AIs pitted against each other, with the northern team assigned a &amp;quot;protect_area&amp;quot; goal centered around the same village with a radius of 5 for comparison with the total defense Micro AI. In both scenarios the northern (defending) team was forced to stop recruiting after turn 4, so that the southern team would eventually overwhelm the northern team with the idea being to see how long each AI could keep the opponent from capturing the defended village. The performance of my total defense Micro AI in comparison to a simple protect_area goal was somewhat underwhelming. The team in general would last about the same amount of turns as the protect_area AI, though it is worth noting that the total defense Micro AI would never lose control of the village, while the protect_area AI would. Generally the leader would die due to not being a part of the defensive structure around the village in the total defense AI.&lt;br /&gt;
&lt;br /&gt;
Included here is a picture of the formation created by the total defense Micro AI around the villiage it is assigned to defend:&lt;br /&gt;
&amp;lt;a href=&amp;quot;https://github.com/jleldridge/wesnoth-old/blob/totaldefensedemo/total_defense_of_village.png&amp;quot;&amp;gt;total_defense_of_village.png&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the commit for the demo. Every commit I made during the demo has been rebased into a single commit so that the related file diffs can be more easily viewed: https://github.com/jleldridge/wesnoth-old/commit/bb478407e29003a930a4cd395018adc7f36aa7c2&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51150</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51150"/>
		<updated>2013-05-22T22:28:54Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Demo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=Demo=&lt;br /&gt;
&lt;br /&gt;
I put together a Micro AI to demonstrate the kind of formation I have in mind to defend a specific area, in this case, the area around a village. The scenario I used to test the Micro AI is a modification of the one used to demonstrate the healer support Micro AI, and consists of two sides: the red total defense Micro AI in the north and the blue healer support Micro AI in the south. I chose to pit the total defense AI against the healer support AI because it generally uses the standard RCA AI candidate action loop, but uses healers a bit more intelligently.&lt;br /&gt;
&lt;br /&gt;
In the scenario, I'm having the total defense Micro AI defend the area around the village just north of the river in the center of the map by positioning uninjured, non-healer units on the outside of the area facing the enemy, and injured or healer units on the inside just behind the defender line. Units that fall under 50% hp are considered &amp;quot;injured&amp;quot; and will fall back to the interior of the defense radius.&lt;br /&gt;
&lt;br /&gt;
I also ran this scenario with just two healer support Micro AIs pitted against each other, with the northern team assigned a &amp;quot;protect_area&amp;quot; goal centered around the same village with a radius of 5 for comparison with the total defense Micro AI. In both scenarios the northern (defending) team was forced to stop recruiting after turn 4, so that the southern team would eventually overwhelm the northern team with the idea being to see how long each AI could keep the opponent from capturing the defended village. The performance of my total defense Micro AI in comparison to a simple protect_area goal was somewhat underwhelming. The team in general would last about the same amount of turns as the protect_area AI, though it is worth noting that the total defense Micro AI would never lose control of the village, while the protect_area AI would. Generally the leader would die due to not being a part of the defensive structure around the village in the total defense AI.&lt;br /&gt;
&lt;br /&gt;
Included here is a picture of the formation created by the total defense Micro AI around the villiage it is assigned to defend: ...&lt;br /&gt;
https://github.com/jleldridge/wesnoth-old/blob/totaldefensedemo/total_defense_of_village.png&lt;br /&gt;
&lt;br /&gt;
Here is the commit for the demo. Every commit I made during the demo has been rebased into a single commit so that the related file diffs can be more easily viewed: https://github.com/jleldridge/wesnoth-old/commit/bb478407e29003a930a4cd395018adc7f36aa7c2&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51149</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51149"/>
		<updated>2013-05-22T22:27:03Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Demo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=Demo=&lt;br /&gt;
&lt;br /&gt;
I put together a Micro AI to demonstrate the kind of formation I have in mind to defend a specific area, in this case, the area around a village. The scenario I used to test the Micro AI is a modification of the one used to demonstrate the healer support Micro AI, and consists of two sides: the red total defense Micro AI in the north and the blue healer support Micro AI in the south. I chose to pit the total defense AI against the healer support AI because it generally uses the standard RCA AI candidate action loop, but uses healers a bit more intelligently.&lt;br /&gt;
&lt;br /&gt;
In the scenario, I'm having the total defense Micro AI defend the area around the village just north of the river in the center of the map by positioning uninjured, non-healer units on the outside of the area facing the enemy, and injured or healer units on the inside just behind the defender line. Units that fall under 50% hp are considered &amp;quot;injured&amp;quot; and will fall back to the interior of the defense radius.&lt;br /&gt;
&lt;br /&gt;
I also ran this scenario with just two healer support Micro AIs pitted against each other, with the northern team assigned a &amp;quot;protect_area&amp;quot; goal centered around the same village with a radius of 5 for comparison with the total defense Micro AI. In both scenarios the northern (defending) team was forced to stop recruiting after turn 4, so that the southern team would eventually overwhelm the northern team with the idea being to see how long each AI could keep the opponent from capturing the defended village. The performance of my total defense Micro AI in comparison to a simple protect_area goal was somewhat underwhelming. The team in general would last about the same amount of turns as the protect_area AI, though it is worth noting that the total defense Micro AI would never lose control of the village, while the protect_area AI would. Generally the leader would die due to not being a part of the defensive structure around the village in the total defense AI.&lt;br /&gt;
&lt;br /&gt;
Included here is a picture of the formation created by the total defense Micro AI around the villiage it is assigned to defend:&lt;br /&gt;
https://github.com/jleldridge/wesnoth-old/blob/totaldefensedemo/total_defense_of_village.png&lt;br /&gt;
&lt;br /&gt;
Here is the commit for the demo. Every commit I made during the demo has been rebased into a single commit so that the related file diffs can be more easily viewed: https://github.com/jleldridge/wesnoth-old/commit/bb478407e29003a930a4cd395018adc7f36aa7c2&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51148</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51148"/>
		<updated>2013-05-22T22:25:36Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Demo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=Demo=&lt;br /&gt;
&lt;br /&gt;
I put together a Micro AI to demonstrate the kind of formation I have in mind to defend a specific area, in this case, the area around a village. The scenario I used to test the Micro AI is a modification of the one used to demonstrate the healer support Micro AI, and consists of two sides: the red total defense Micro AI in the north and the blue healer support Micro AI in the south. I chose to pit the total defense AI against the healer support AI because it generally uses the standard RCA AI candidate action loop, but uses healers a bit more intelligently.&lt;br /&gt;
&lt;br /&gt;
In the scenario, I'm having the total defense Micro AI defend the area around the village just north of the river in the center of the map by positioning uninjured, non-healer units on the outside of the area facing the enemy, and injured or healer units on the inside just behind the defender line. Units that fall under 50% hp are considered &amp;quot;injured&amp;quot; and will fall back to the interior of the defense radius.&lt;br /&gt;
&lt;br /&gt;
I also ran this scenario with just two healer support Micro AIs pitted against each other, with the northern team assigned a &amp;quot;protect_area&amp;quot; goal centered around the same village with a radius of 5 for comparison with the total defense Micro AI. In both scenarios the northern (defending) team was forced to stop recruiting after turn 4, so that the southern team would eventually overwhelm the northern team with the idea being to see how long each AI could keep the opponent from capturing the defended village. The performance of my total defense Micro AI in comparison to a simple protect_area goal was somewhat underwhelming. The team in general would last about the same amount of turns as the protect_area AI, though it is worth noting that the total defense Micro AI would never lose control of the village, while the protect_area AI would. Generally the leader would die due to not being a part of the defensive structure around the village in the total defense AI.&lt;br /&gt;
&lt;br /&gt;
Included here is a picture of the formation created by the total defense Micro AI around the villiage it is assigned to defend: https://github.com/jleldridge/wesnoth-old/blob/totaldefensedemo/total_defense_of_village.png&lt;br /&gt;
&lt;br /&gt;
Here is the commit for the demo. Every commit I made during the demo has been rebased into a single commit so that the related file diffs can be more easily viewed: https://github.com/jleldridge/wesnoth-old/commit/bb478407e29003a930a4cd395018adc7f36aa7c2&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51147</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51147"/>
		<updated>2013-05-22T21:51:00Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=Demo=&lt;br /&gt;
https://github.com/jleldridge/wesnoth-old/commits/totaldefensedemo&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51113</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51113"/>
		<updated>2013-05-21T18:40:04Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit. This may be best implemented as a stand-alone candidate action using the cpp engine since it would likely be used by multiple defense strategies.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51112</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51112"/>
		<updated>2013-05-21T18:10:12Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Rotate strong, undamaged units to replace damaged units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would also be used in parallel with any of the other ideas. Units that make up the defensive formation should be rotated out when they are likely to die in the next turn or two. This would only occur if it is possible to replace that unit with a unit that is likely to live in that spot for longer than the current unit.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51074</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51074"/>
		<updated>2013-05-17T19:36:34Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general area that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51073</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51073"/>
		<updated>2013-05-17T19:34:56Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each engine.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51070</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51070"/>
		<updated>2013-05-17T17:32:19Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 2) Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/0d8bd9fe03b8e5bd0e062c8208e6bfc1022fc370&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/8665d09ac49c29aafcc2728aa3b7da6eca8e4a27&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/fc7455b81b69dbfebee732a29023483439b721c7&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;https://github.com/wesnoth/wesnoth-old/commit/7a2c8dbce2a37959788bcb28fbdf131c1087abdd&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51069</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51069"/>
		<updated>2013-05-17T17:26:34Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 2) Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (during the evaluation period or earlier) please state so.&lt;br /&gt;
&lt;br /&gt;
https://github.com/wesnoth/wesnoth-old/commit/4e6ecc81ce89a6eea4c5afaa0fa51195a951bffd&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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51068</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51068"/>
		<updated>2013-05-17T17:12:53Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have more refined versions of the strategies, having determined which ideas work best in each&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;August 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have project finished and as bug free as possible.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51067</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51067"/>
		<updated>2013-05-17T17:10:44Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
&amp;lt;b&amp;gt;May 3 - May 27:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Final exams on 5/3, 5/6, 5/8, and 5/9.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get experience playing the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Become familiar with the parts of the code that I'll be working with.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improve proposal.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;May 28 - June 16:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;June 30:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find a metric by which to measure the performance of the each AI defense strategy.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;July 15:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the strategies, having determined which ideas work best in each &lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51066</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51066"/>
		<updated>2013-05-17T17:07:16Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible strategies, which AI engine to use to apply them in the code, etc.&lt;br /&gt;
Begin coding simple forms of each idea in the different engines to see what obstacles each one presents, and which one seems to work the best.&lt;br /&gt;
Create test scenarios to allow the AIs to be easily compared to each other against human opponents and other AIs.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the each AI defense strategy.&lt;br /&gt;
Start determining which idea in which engine seems to be most successful at achieving the desired behavior.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the strategies, having determined which ideas work best in each &lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing (hopefully against mostly human opponents) and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51065</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51065"/>
		<updated>2013-05-17T16:58:02Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
I plan to use the LUA engine and custom Micro AIs with high candidate action scores under certain conditions to exactly position units once they manage to get into the general are that is to be defended. Micro AIs allow for the grouping of several behaviors into one file, as well as the selection of units that will be affected by the Micro AI, so Micro AIs seem like the most flexible way to create total defense behavior.&lt;br /&gt;
&lt;br /&gt;
To define the area that is to be defended, &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; [goal] tags could be used to modify where the movement candidate actions send units. The &amp;quot;protect_unit&amp;quot; and &amp;quot;protect_area&amp;quot; goal tags use the number of enemy units within a radius of the thing to be protected as a heuristic; if this proves insufficient to get units into desired defensible positions, new	goals can be created that use different heuristics to work in combination with the current goals. If goals are not flexible enough to get the desired movement behavior, a Micro AI can be used that explicitly ignores the movement candidate actions and takes care of moving units into defensible positions itself.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51063</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51063"/>
		<updated>2013-05-16T23:43:34Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines. This would likely be best done with a Micro AI that represents several high scoring candidate actions,&lt;br /&gt;
to perform these stages in the order that they are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51062</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51062"/>
		<updated>2013-05-16T22:04:02Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have the AI make an intelligent fallback when necessary.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be developed in parallel to each of the other ideas, because it could be applied to each of them. The idea here is to sort out whether defending a specific area is actually possible or worthwhile based on the kind of force an enemy is attacking with. Heuristics could be used to measure if it is worthwhile to stay and sacrifice units to delay the enemy, or to retreat to save units. If a Micro AI were used, parameters could be passed in to modify how &amp;quot;hopeless&amp;quot; a situation would need to be before the AI abandoned the position. This mechanic would also specify where the AI should retreat to, and possibly include a heuristic to pick another currently defended or defensible position to fall back to.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51058</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51058"/>
		<updated>2013-05-16T03:09:36Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Take the entire area to be defended as a unit, and create set formations based on available units.&amp;lt;/h4&amp;gt;&lt;br /&gt;
This would be similar to identifying &amp;quot;critical areas&amp;quot;, except that instead of separating out areas to be defended and dividing up units to those areas, take the entire area to be defended as critical. Vulnerable units are moved to the interior of the area, tough units are placed in a formation along the perimeter of the area based on how many such units are available, the size of the area, the direction the enemy is known to be coming from, the terrain in the area, and what kind of vulnerable units are being defended (e.g. if healers are present, the formation should put as many units as possible within range of the healers).&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51057</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51057"/>
		<updated>2013-05-16T02:57:11Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51056</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51056"/>
		<updated>2013-05-16T02:56:08Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the area and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51055</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51055"/>
		<updated>2013-05-16T02:55:10Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The hope here is that these priorities would encourage the natural formation of &amp;quot;neat&amp;quot; battle lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Identify &amp;quot;critical areas&amp;quot; within a total area that the AI wants to defend.&amp;lt;/h4&amp;gt;&lt;br /&gt;
The idea here is that if the AI is supposed to defend a certain area, certain &amp;quot;critical areas&amp;quot;, areas that the AI really does not want the enemy to enter (e.g. towns, choke points), can be identified within the total area to be defended. Once the &amp;quot;critical areas&amp;quot; are identified, vulnerable units can be moved into these critical areas, and tougher units can be evenly allocated in predefined formations around these critical areas. The formations could depend on what kind of &amp;quot;critical area&amp;quot; the units are defending, what kind of vulnerable units occupy the &amp;quot;critical area&amp;quot; and how many tough units are available to defend that area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51054</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51054"/>
		<updated>2013-05-16T02:26:55Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51053</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51053"/>
		<updated>2013-05-16T02:26:15Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Maximize space betwen vulnerable units and enemy units.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Maximize space between vulnerable units and enemy units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Location_set&amp;diff=51052</id>
		<title>LuaWML/Location set</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Location_set&amp;diff=51052"/>
		<updated>2013-05-16T02:25:38Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* location_set:of_pairs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] class for handling location sets and location maps. Objects of this class store a set of locations, with some data (boolean ''true'', by default) attached to each of them. It is not possible to associate ''nil'' or ''false'' to a location.&lt;br /&gt;
&lt;br /&gt;
There is one main constructor [[#location_set.create]] and two auxiliary helper constructors [[#location_set.of_pairs]] and [[#location_set.of_wml_var]]. They are provided by the ''lua/location_set.lua'' file. All the other functions are methods from the class and they are available through the ':' operator only.&lt;br /&gt;
&lt;br /&gt;
 local location_set = wesnoth.require &amp;quot;lua/location_set.lua&amp;quot;&lt;br /&gt;
 local a_set = location_set.create()&lt;br /&gt;
 a_set:insert(17, 42, &amp;quot;something&amp;quot;)&lt;br /&gt;
 assert(a_set:get(17, 42) == &amp;quot;something&amp;quot;)&lt;br /&gt;
 local b_set = location_set.of_pairs(wesnoth.get_locations { { &amp;quot;filter_adjacent&amp;quot;, { x=17, y=42 } } })&lt;br /&gt;
 a_set:union(b_set)&lt;br /&gt;
 a_set:to_wml_var &amp;quot;locations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== location_set.create ====&lt;br /&gt;
&lt;br /&gt;
Returns an empty location set.&lt;br /&gt;
&lt;br /&gt;
==== location_set.of_pairs ====&lt;br /&gt;
&lt;br /&gt;
Returns a fresh location set filled by [[#location_set:of_pairs]].&lt;br /&gt;
&lt;br /&gt;
==== location_set.of_wml_var ====&lt;br /&gt;
&lt;br /&gt;
Returns a fresh location set filled by [[#location_set:of_wml_var]].&lt;br /&gt;
&lt;br /&gt;
==== location_set:empty ====&lt;br /&gt;
&lt;br /&gt;
Returns ''true'' if the set is empty.&lt;br /&gt;
&lt;br /&gt;
 local some_set = location_set.create()&lt;br /&gt;
 assert(some_set:empty())&lt;br /&gt;
&lt;br /&gt;
==== location_set:size ====&lt;br /&gt;
&lt;br /&gt;
Returns the number of locations in the set.&lt;br /&gt;
&lt;br /&gt;
 some_set:insert(17, 42)&lt;br /&gt;
 assert(some_set:size() == 1)&lt;br /&gt;
&lt;br /&gt;
==== location_set:clear ====&lt;br /&gt;
&lt;br /&gt;
Empties the content of the set.&lt;br /&gt;
&lt;br /&gt;
 some_set:clear()&lt;br /&gt;
 assert(not some_set:get(17, 42))&lt;br /&gt;
&lt;br /&gt;
==== location_set:get ====&lt;br /&gt;
&lt;br /&gt;
Returns the data associated to the given location or ''nil'' if the location is not in the set.&lt;br /&gt;
&lt;br /&gt;
 some_set:insert(17, 42, &amp;quot;something&amp;quot;)&lt;br /&gt;
 assert(some_set:get(17, 42) == &amp;quot;something&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== location_set:insert ====&lt;br /&gt;
&lt;br /&gt;
Associates some data to the given location, or ''true'' if there is no data. Previous associated data is lost.&lt;br /&gt;
&lt;br /&gt;
 some_set:insert(17, 42)&lt;br /&gt;
 assert(some_set:get(17, 42))&lt;br /&gt;
&lt;br /&gt;
==== location_set:remove ====&lt;br /&gt;
&lt;br /&gt;
Removes the given location from the set.&lt;br /&gt;
&lt;br /&gt;
 some_set:remove(17, 42)&lt;br /&gt;
&lt;br /&gt;
==== location_set:of_pairs ====&lt;br /&gt;
&lt;br /&gt;
Inserts all the locations from an array containing pairs (arrays with two elements). Previous content of the set is kept, unless overwritten by the content of the array.&lt;br /&gt;
&lt;br /&gt;
 some_set:of_pairs(wesnoth.get_locations { { &amp;quot;filter_adjacent&amp;quot;, { x=17, y=42 } } })&lt;br /&gt;
&lt;br /&gt;
Can also read in tables with location tables of the form {x = some_number, y = some_number} like what is returned by ai.get_avoid().&lt;br /&gt;
&lt;br /&gt;
 some_set:of_pairs(ai.get_avoid())&lt;br /&gt;
&lt;br /&gt;
If any extra data is included in the table for an individual location in the input, it will be put into a table and associated with that location's index in the location_set. Otherwise the data associated with a location's index is &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== location_set:of_wml_var ====&lt;br /&gt;
&lt;br /&gt;
Inserts all the locations from a WML array. If a container has more than just ''x'' and ''y'' attributes, the remaining attributes and children are associated to the location as a WML table. Previous content of the set is kept, unless overwritten by the content of the WML array.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.wml_actions.store_locations { variable=&amp;quot;target&amp;quot;, { &amp;quot;filter_adjacent&amp;quot;, { x=17, y=42 } } }&lt;br /&gt;
 some_set:of_wml_var &amp;quot;target&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== location_set:to_pairs ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of pairs containing the locations of the set. Associated data are ignored. The order of the locations is not deterministic. If the order actually matters, the [[#location_set:to_stable_pairs]] method should be used instead.&lt;br /&gt;
&lt;br /&gt;
 local size = #(some_set:to_pairs())&lt;br /&gt;
&lt;br /&gt;
==== location_set:to_stable_pairs ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of pairs containing the locations of the set. Contrarily to [[#location_set:to_pairs]], the locations are guaranteed to be sorted and hence synchronized over networks and replays.&lt;br /&gt;
&lt;br /&gt;
==== location_set:to_wml_var ====&lt;br /&gt;
&lt;br /&gt;
Fills a WML array with the content of the set. The order of the elements is safe.&lt;br /&gt;
&lt;br /&gt;
 local some_set = location_set.of_pairs(wesnoth.get_locations { { &amp;quot;filter_adjacent&amp;quot;, { x=17, y=42 } } })&lt;br /&gt;
 some_set:to_wml_var &amp;quot;locations&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== location_set:union ====&lt;br /&gt;
&lt;br /&gt;
Inserts the locations from the other set, possibly overwriting the associated of data the locations already present.&lt;br /&gt;
&lt;br /&gt;
 a_set:insert(17, 42, &amp;quot;nothing&amp;quot;)&lt;br /&gt;
 b_set:insert(17, 42, &amp;quot;something&amp;quot;)&lt;br /&gt;
 a_set:union(b_set)&lt;br /&gt;
 assert(a_set:get(17, 42) == &amp;quot;something&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== location_set:inter ====&lt;br /&gt;
&lt;br /&gt;
Deletes the locations that are not in the other set. Associated data is kept intact if not removed.&lt;br /&gt;
&lt;br /&gt;
 a_set:insert(17, 42, &amp;quot;nothing&amp;quot;)&lt;br /&gt;
 b_set:insert(17, 42, &amp;quot;something&amp;quot;)&lt;br /&gt;
 a_set:inter(b_set)&lt;br /&gt;
 assert(a_set:get(17, 42) == &amp;quot;nothing&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== location_set:iter ====&lt;br /&gt;
&lt;br /&gt;
Calls the given function on all the locations of the set. Iteration order is not deterministic. If the order actually matters, the [[#location_set:stable_iter]] method should be used instead.&lt;br /&gt;
&lt;br /&gt;
 some_set:iter(function(x, y, data) wesnoth.message(string.format(&amp;quot;[%d,%d] = %s&amp;quot;, x, y, type(data))) end)&lt;br /&gt;
&lt;br /&gt;
==== location_set:stable_iter ====&lt;br /&gt;
&lt;br /&gt;
Calls the given function on all the locations of the set. Contrarily to [[#location_set:iter]], the iteration is deterministic and hence safe for networks and replays.&lt;br /&gt;
&lt;br /&gt;
 some_set:stable_iter(function(x, y, data) wesnoth.message(string.format(&amp;quot;[%d,%d] = %s&amp;quot;, x, y, type(data))) end)&lt;br /&gt;
&lt;br /&gt;
==== location_set:filter ====&lt;br /&gt;
&lt;br /&gt;
Returns a new set containing all the locations of the set for which the given function returns true.&lt;br /&gt;
&lt;br /&gt;
 local new_set = old_set:filter(function(x, y, v)&lt;br /&gt;
   local d = helper.distance_between(a, b, x, y)&lt;br /&gt;
   return d &amp;lt;= 5 and v == &amp;quot;not found&amp;quot;&lt;br /&gt;
 end)&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;%d traps in the neighborhood of (%d,%d)&amp;quot;, new_set:size(), a, b))&lt;br /&gt;
&lt;br /&gt;
==== location_set:union_merge ====&lt;br /&gt;
&lt;br /&gt;
Calls the given function for all the locations of the other set and uses the returned values to fill the set. Note: the merge order is not stable.&lt;br /&gt;
&lt;br /&gt;
 -- merge the elements of s2 into s1 but preserve the old data of s1&lt;br /&gt;
 function set_union(s1, s2)&lt;br /&gt;
     s1:union_merge(s2, function(x, y, v1, v2) return v1 or v2 end)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 -- remove from s1 the elements of s2&lt;br /&gt;
 function set_difference(s1, s2)&lt;br /&gt;
     -- the nested function is called s2:size() times; note: v2 is never nil&lt;br /&gt;
     s1:union_merge(s2, function(x, y, v1, v2) return nil end)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== location_set:inter_merge ====&lt;br /&gt;
&lt;br /&gt;
Calls the given function for all the locations of the set and uses the returned values to replace it. Note: the merge order is not stable.&lt;br /&gt;
&lt;br /&gt;
 -- compute the intersection of s1 and s2 and put it into s1, but overwrite the data of s1&lt;br /&gt;
 function set_inter(s1, s2)&lt;br /&gt;
     s1:inter_merge(s2, function(x, y, v1, v2) return v2 or v1 end)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 -- remove from s1 the elements of s2&lt;br /&gt;
 function set_difference(s1, s2)&lt;br /&gt;
     -- the nested function is called s1:size() times; note: v1 is never nil&lt;br /&gt;
     s1:inter_merge(s2, function(x, y, v1, v2) return not v2 end)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51051</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51051"/>
		<updated>2013-05-16T02:07:15Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 5) Practical considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
1. Minimize the number of enemy units that can get within attack range of vulnerable units.&lt;br /&gt;
2. Maximize space betwen vulnerable units and enemy units.&lt;br /&gt;
3. Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Maximize space between vulnerable units and enemy units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) Yes, in the past two weeks I've had plenty of exposure to it.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) Yes, in the past two weeks I've also learned a fair amount of LUA.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Micro_AIs&amp;diff=51044</id>
		<title>Micro AIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Micro_AIs&amp;diff=51044"/>
		<updated>2013-05-14T20:22:23Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Healer Support specific keys for the [micro_ai] tag: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirco AIs allow Wesnoth campaign and scenario authors to add new AI functionality without the need for any AI programming.  A Micro AI is activated and configured (or deleted) via the [micro_ai] tag, requiring only a few lines of WML code.  Note that this is a new functionality and theat '''we are very much looking for feedback''' on bugs, new feature requests for the existing AIs or ideas for new Micro AIs.&lt;br /&gt;
&lt;br /&gt;
Micro AIs are available in mainline Wesnoth '''starting from Version 1.11.2'''.  Additional AIs that are still in an experimental stage are available in the ''AI Modification Demos'' add-on, which also might contain more advanced (development) versions of the mainline Micro AIs.&lt;br /&gt;
&lt;br /&gt;
== A Few General Words about Micro AIs ==&lt;br /&gt;
&lt;br /&gt;
* Micro AIs are meant to bring new specialized behavior to Wesnoth that cannot be achieved, at least not easily, by adjusting default AI parameters (such as those described at [[AiWML]]) or with WML code.&lt;br /&gt;
&lt;br /&gt;
* Most Micro AIs in their default setting apply to all units of a side, although many of them provide parameters for filtering the units that should be affected by the new behavior.  If the Micro AI is applied only to part of the units of a side, the other units follow the default Wesnoth AI behavior.&lt;br /&gt;
&lt;br /&gt;
* By contrast, a few Micro AIs attach directly to a unit and only affect that unit's behavior.  These are so-called [[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|Behavior Candidate Actions]] (BCAs).  This type of Micro AI has an [[Micro_AIs#2._Activating_and_configuring_.28or_deleting.29_a_Micro_AI|ai_type=]] value ending in ''_unit'', in order to distinguish it from the side-wide Micro AIs.&lt;br /&gt;
&lt;br /&gt;
=== Micro AI Test and Demo Scenarios ===&lt;br /&gt;
&lt;br /&gt;
All Micro AIs described here can be checked out in a number of test and demo scenarios.  Test scenarios can be accessed from the command line by typing&lt;br /&gt;
 path/wesnoth-executable -t micro_ai_test&lt;br /&gt;
This starts up a &amp;quot;switchboard scenario&amp;quot; in which you can select the Micro AI demonstration scenario you want to check out.  Here, ''path/wesnoth-executable'' needs to be replaced by whatever the path and filename of the Wesnoth executable is on your system.&lt;br /&gt;
&lt;br /&gt;
Another way to test the Micro AIs (as well as some other AIs still under development) is to download the ''AI Modification Demos'' add-on.  All the test/demo scenarios are also available there.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Micro AI ==&lt;br /&gt;
&lt;br /&gt;
Setting up a Micro AI is done in two simple steps:&lt;br /&gt;
&lt;br /&gt;
==== 1. Enabling the Micro AI functionality in the [side] tag ====&lt;br /&gt;
&lt;br /&gt;
The desired AI functionality needs to be enabled for a side before it can be used.  This is done by including a single macro line inside the [side] tag, such as:&lt;br /&gt;
     {MICRO_AI_HEALER_SUPPORT}&lt;br /&gt;
The exact macro name depends on the specific Micro AI and is given below for each AI.  This macro must be put '''directly into the [side] tag''', it does not go inside an [ai] tag.  This step does not yet activate the Micro AI, it simply sets up the desired functionality.&lt;br /&gt;
&lt;br /&gt;
==== 2. Activating and configuring (or deleting) a Micro AI ====&lt;br /&gt;
&lt;br /&gt;
Micro AIs are activated, deleted and configured using the [micro_ai] tag.  This tag needs to be placed in [[ActionWML]], that is, in an event, a menu option or the like.  As an example, the following code activates the healer_support Micro AI in its default configuration for Side 2 from the beginning of the scenario:&lt;br /&gt;
     [event]&lt;br /&gt;
         name=prestart&lt;br /&gt;
 &lt;br /&gt;
         # Configure the healer support micro AI&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=healer_support&lt;br /&gt;
             action=add&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
     [/event]&lt;br /&gt;
All [micro_ai] tags must contain the following three (or four) required keys:&lt;br /&gt;
* '''side''': The side for which the Micro AI is to be added, changed or deleted&lt;br /&gt;
* '''ai_type''': The type of Micro AI to be added, changed or deleted.  See the following sections for allowed values.&lt;br /&gt;
* '''action''' (string): The action to take concerning the Micro AI.  The following values are allowed: &lt;br /&gt;
** ''add'': Add a Micro AI to a side.&lt;br /&gt;
** ''change'': Change the configuration of an existing Micro AI.  Note that this does not only change the specific parameters provided in the tag, but it replaces the entire existing Micro AI by a new version with the new (and only the new) configuration.  It is therefore equivalent to using first the ''delete'' and then the ''add'' action.&lt;br /&gt;
** ''delete'': Delete an existing Micro AI from a side.&lt;br /&gt;
* '''id''': If the Micro AI attaches directly to a unit, rather than being side-wide, the id of the unit is also a required parameter.&lt;br /&gt;
&lt;br /&gt;
Other keys may also be required depending on the Micro AI.  In additional, a number of optional keys may be available to configure the AI behavior.  See the following sections on the individual Micro AIs for details.&lt;br /&gt;
&lt;br /&gt;
'''Notes:''' &lt;br /&gt;
* The ''add'' and ''change'' actions ignore all keys that do not apply to the respective Micro AI type.  The ''delete'' action ignores all keys other than the three (or four) required keys listed here.&lt;br /&gt;
&lt;br /&gt;
* Some of the Micro AIs use and/or modify default AI components (candidate actions or aspects) when they are added, or reset these components to their default values when they are deleted.  Thus, if you have modified the AI yourself using the default CAs or aspects, some of these modifications might be affected, or might be interfering with the Micro AI.  The sections below indicate whether a Micro AI modifies any default AI components.&lt;br /&gt;
&lt;br /&gt;
* It is currently not possible to combine different Micro AI types (AIs using different values of ai_type=) on the same side.  In other words, you can use several guardians (and even different guardian types) on the same side (as they are all handled by the Guardian Micro AI), but it is not possible to put, for example, guardians and patrollers on the same side.  This restriction will be lifted in an upcoming release.  In the meantime, you will have to use different (allied) sides to accomplish this.&lt;br /&gt;
&lt;br /&gt;
== Animals Micro AI (ai_type=animals) ==&lt;br /&gt;
&lt;br /&gt;
The Animals Micro AIs are meant to simulate the behaviors of certain types of animals.  They are, however, set up so that they can be used with arbitrary unit types and might be applicable in quite diverse situations.  The AIs nevertheless remain named after the animals for which they were written originally, so that they are (to some extent) descriptive of their behavior.&lt;br /&gt;
&lt;br /&gt;
Brief descriptions of the AI behaviors are given in the following subsections.  To get a better feeling for their behavior, check out the &amp;quot;Animals&amp;quot;, &amp;quot;Swarm&amp;quot;, &amp;quot;Wolves&amp;quot; and &amp;quot;Dragon&amp;quot; scenarios from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.  Note that some of the animal AIs are designed for animal types that do not exist in mainline.  In the test scenario, other animal types are therefore substituted for them.  If you want to see them with the animal types for which they were written, check out the ''AI Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable an Animals Micro AI by putting&lt;br /&gt;
 {MICRO_AI_ANIMALS}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=animals&lt;br /&gt;
in the [micro_ai] tag. The ''animal_type='' tag is then used to select the desired animal AI.&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Wolves (animal_type=wolves) ===&lt;br /&gt;
&lt;br /&gt;
The Wolves Micro AI organizes all &amp;quot;wolf&amp;quot; units (predators) of the side to hunt in a single pack.  They actively chase after the closest prey and try to corner it (not always super successfully), but are easily distracted by other prey coming into range, to the point where the pack splits up.  The wolves can also be told to try to avoid other types of units (such as larger predators), except when they are going in for an attack.  When no prey is left, the wolves wander randomly.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Wolves AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Note that another wolves AI exists, called [[Micro_AIs#Animals_AI:_Multi-pack_Wolves_.28animal_type.3Dwolves_multipacks.29|Multipack Wolves]], which distributes the wolves of a side into several packs, rather than all of them into one single pack as it is done here.&lt;br /&gt;
&lt;br /&gt;
You can configure the Wolves Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;wolves&amp;quot;.&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the predator units.  '''Note: this was called [predators] in 1.11.2'''&lt;br /&gt;
* '''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the prey units.  '''Note: this was called [prey] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''avoid_type''': Comma-separated list of unit types which the wolves try to avoid&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Wolves Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].&lt;br /&gt;
&lt;br /&gt;
Here's an example of a wolves [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=6&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=wolves&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Wolf&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_second]&lt;br /&gt;
                 type=Deer&lt;br /&gt;
             [/filter_second]&lt;br /&gt;
             avoid_type=Yeti,Giant Spider,Tarantula,Bear,Dog&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Multi-pack Wolves (animal_type=wolves_multipacks) ===&lt;br /&gt;
&lt;br /&gt;
The Multi-pack Wolves Micro AI is different from the [[Micro_AIs#Animals_AI:_Wolves_.28animal_type.3Dwolves.29|Wolves Micro AI]] in that there can be an arbitrary number of wolf packs, with the pack size being a free parameter.  At the beginning of the scenario, close wolves are grouped into packs in a semi-methodical way.  If the wolves are put on the map in distinct groups of close wolves of the correct number, they will be joined into packs matching these groups.  If, on the other hand, they are spread out all over the map, the method of assigning them to packs is semi-random.&lt;br /&gt;
&lt;br /&gt;
Wolves of the same pack begin by joining each other on the map.  After that, they stay together until only one wolf is left, which then tries to join up with an incomplete pack or with other single wolves.  Individual wolves entering the map during the scenario behave in that way as well.&lt;br /&gt;
&lt;br /&gt;
A second difference to the other Wolves AI is that wolves do not actively hunt here.  For the most part they just wander (often long distance).  However, the pack ferociously (and without regard for its own health) attacks any enemy units that come into range, as long as that does not mean separating the pack by more than a few hexes.  Staying together, or joining with a new wolf assigned to the pack, is the only thing that takes priority over satisfying the wolves' thirst for blood.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Multi-pack Wolves AI behavior, check out the &amp;quot;Wolves&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Multi-pack Wolves Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;wolves_multipacks&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''type'''=Wolf: Comma-separated list of the unit types which the AI controls. The default value is &amp;quot;Wolf&amp;quot;.&lt;br /&gt;
* '''pack_size'''=3: (integer) The size of the packs.&lt;br /&gt;
* '''show_pack_number'''=no: If set to &amp;quot;yes&amp;quot;, the wolves' pack numbers will be shown below them.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a wolves_multipacks [micro_ai] tag usage from the &amp;quot;Wolves&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=wolves_multipacks&lt;br /&gt;
             show_pack_number=yes&lt;br /&gt;
             pack_size=4&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Big Animals (animal_type=big_animals) ===&lt;br /&gt;
&lt;br /&gt;
The Big Animals Micro AI is a simulation of large predators that wander and hunt alone, such as Bears, Giant Spiders or Yetis.  For the most part, these just wander on the terrain that's been defined for them, but they attack enemy units if those happen to come into range.  The AI can be set up so that the Big Animals stay out of the way of other units (such as other large predators), in which case they only attack those if cornered.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Big Animals AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Big Animals Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;big_animals&amp;quot;&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the animals to which this AI is applied.  '''Note: this was called [big_animals] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': The big animals often go for long distance (multi-turn) journeys.  This tag is a [[StandardLocationFilter|Standard Location Filter]] describing the terrain from which the next goal is chosen.  The default is all terrain on the map.  '''Note: this was called [goal_terrain] in 1.11.2'''&lt;br /&gt;
* '''[filter_location_wander]''': The terrain on which the big animals will end their moves. This is a [[StandardLocationFilter|Standard Location Filter]].  The default is all terrain on the map.  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''[avoid_unit]''': A [[StandardUnitFilter|Standard Unit Filter]] describing all enemy units that the big animals will avoid.  Note that the condition that this must be enemy units is added by the AI automatically and does not need to be included in the filter.&lt;br /&gt;
&lt;br /&gt;
Here's an example of big_animals [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=3&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=big_animals&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Bear&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [avoid_unit]&lt;br /&gt;
                 type=Yeti,Giant Spider,Tarantula,Bear,Dog&lt;br /&gt;
             [/avoid_unit]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=1-40,1-18&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             [filter_location_wander]&lt;br /&gt;
                 terrain=*&lt;br /&gt;
             [/filter_location_wander]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Forest Animals (animal_type=forest_animals) ===&lt;br /&gt;
&lt;br /&gt;
The Forest Animals Micro AI simulates a number of different animal behaviors that one might find in a forest, namely animals behaving like deer, rabbits and families of tuskers.  In the following, we will refer to those animals by these types, even though the actual unit types can be selected freely.  They behave as follows:&lt;br /&gt;
* Each deer wanders randomly on (selectable) terrain, except when enemies get in its (the deer's) maximum movement range, in which case it flees to the farthest point it can reach.&lt;br /&gt;
* Tuskers exhibit the same behavior as deer, except when an enemy is next to one of the tusklets.  This enemy is attacked unconditionally by the tuskers trying to protect their young.&lt;br /&gt;
* Tusklets blindly follow the closest adult tusker, except when there is no tusker left, in which case they behave the same as deer.&lt;br /&gt;
* Rabbits also wander randomly, but in addition disappear into their holes (if any are within reach) when enemies are close.  They reappear out of their holes at the beginning of the turn, if it is safe.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Forest Animals AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the test scenario or in the AI Modification Demos add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Forest Animals Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;forest_animals&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''rabbit_type, tusker_type, tusklet_type, deer_type''': Comma-separated lists of the unit types behaving as the respective animals.  If any of these parameters are not set, those types of animal behavior are skipped by the AI.&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the terrain on which the forest animals wander when they are not threatened by enemies.  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''rabbit_number'''=6: (integer)  The number of rabbits for the AI to have on the map simultaneously.  The AI puts the missing number of rabbits onto the map at the beginning of the AI's turn (when the rabbits come out of their holes).&lt;br /&gt;
* '''rabbit_enemy_distance'''=3: (number)  Rabbits won't spawn in holes that aren't more than this distance away from all enemies.&lt;br /&gt;
* '''rabbit_hole_img''': Rabbit holes are marked by items on the map.  If this parameter is set, it must be the file name of the item image.  If it is not set, all items on the map are treated as rabbit holes.&lt;br /&gt;
&lt;br /&gt;
Here's an example of forest_animals [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=forest_animals&lt;br /&gt;
             deer_type=Deer&lt;br /&gt;
             rabbit_type=Rabbit&lt;br /&gt;
             tusker_type=Tusker&lt;br /&gt;
             tusklet_type=Tusklet&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=*^F*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Herd and Herders (animal_type=herding) ===&lt;br /&gt;
&lt;br /&gt;
The Herding Micro AI sets up an area on the map where a number of herder units (such as sheep dog) control and protect a herd (such as sheep).  For convenience, we simply refer to them as sheep dogs and sheep in the following, even though arbitrary unit types can be selected for either.&lt;br /&gt;
&lt;br /&gt;
Sheep dogs try to keep their sheep safe.  This involves keeping them inside the herding area, positioning themselves in between the sheep and approaching enemies, and attacking the enemies if those get too close.  If no active herding or protecting move is needed, the dogs go to a random location on the perimeter of the herding area.&lt;br /&gt;
&lt;br /&gt;
Sheep wander aimlessly except when a sheep dog is next to them, in which case they run away from the dog.  The dogs exploit this by positioning themselves on the outside of the sheep, if possible.  Sheep also run away from approaching enemies.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Herding AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Herding Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;herding&amp;quot;&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] describing the herder units (e.g. dogs).  '''Note: this was called [herders] in 1.11.2'''&lt;br /&gt;
* '''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] describing the herd units (e.g. sheep).  '''Note: this was called [herd] in 1.11.2'''&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the terrain forming the perimeter of the herding area.  In other words, this is the path the herders (dogs) use to patrol around the outside of the herding area.  This must be a set of coordinates ''completely enclosing'' the herding area.  '''Note: this was called [herding_perimeter] in 1.11.2'''.  Here's an example of setting up a rectangular perimeter:&lt;br /&gt;
     [filter_location]&lt;br /&gt;
         x=10-20,10-20,10,  ,20&lt;br /&gt;
         y=11,   21,   11-21,11-21&lt;br /&gt;
     [/filter_location]&lt;br /&gt;
Another possibility is by defining the path by certain terrain on the map (as it is done in the &amp;quot;Animals&amp;quot; test scenario), in which case the filter can simply look like this:&lt;br /&gt;
     [filter_location]&lt;br /&gt;
         terrain=Rb&lt;br /&gt;
     [/filter_location]&lt;br /&gt;
* '''herd_x,herd_y''': The coordinate of one hex (''any'' one hex) inside the herding area.  This is needed to define which part of the map is on the ''inside'' of the herding area perimeter defined by [herding_perimeter], and which is the ''outside''.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''attention_distance'''=8: (integer)  If an enemy is within this distance of a herd unit, but not as close as ''attack_distance'', the herders try to position themselves in between the enemy and the herd unit.&lt;br /&gt;
* '''attack_distance'''=4: (integer)  If an enemy is within this distance of a herd animal, the herders attack this enemy.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a Herding [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=herding&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Dog&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_second]&lt;br /&gt;
                 type=Sheep,Ram&lt;br /&gt;
             [/filter_second]&lt;br /&gt;
             herd_x,herd_y=32,28&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=Rb&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Hunter (animal_type=hunter_unit) ===&lt;br /&gt;
&lt;br /&gt;
The Hunter Micro AI attaches to an individual unit which it leads through hunt-and-rest cycles.  The unit wanders in a prescribed area of the map, its hunting ground, until an enemy unit comes within range.  Note that it does not actively chase down enemies, but wanders randomly through its hunting ground until an enemy is encountered.&lt;br /&gt;
&lt;br /&gt;
If enemies are within range, the hunter attacks the weakest of them.  If a kill is made, it then retreats to its rest location, where it stays for a certain number of turns or until fully healed.&lt;br /&gt;
&lt;br /&gt;
A few more details:&lt;br /&gt;
* If the hunter's way home is entirely blocked on the return (so that there is no possible path), the normal RCA AI takes over its behavior.&lt;br /&gt;
* However, if the way is blocked by an enemy unit occupying the rest hex, that enemy will be attacked unconditionally.&lt;br /&gt;
* A kill only makes the hunter go home when it is the attacker, not as defender.&lt;br /&gt;
&lt;br /&gt;
Multiple hunter units can be used on the same side, by setting up a separate [micro_ai] tag for each unit. &lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Hunter AI behavior, check out the &amp;quot;Dragon&amp;quot; scenario from the test scenario or in the AI Modification Demos add-on. &lt;br /&gt;
&lt;br /&gt;
You can configure the Hunter Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;hunter_unit&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI is to be attached.&lt;br /&gt;
* '''home_x,home_y''': The coordinates of the hex to which the hunter returns and rests at after a kill.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the unit's hunting ground.  If this tag is not provided, the hunter uses all of the map.  '''Note: this was called [hunting_ground] in 1.11.2'''&lt;br /&gt;
* '''rest_turns'''=3: (integer)  The number of turns the AI stays at home_x,home_y after a kill.&lt;br /&gt;
* '''show_messages'''=no: (boolean) If set to yes, the hunter announces whenever its behavior changes to the next phase.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a hunter_unit [micro_ai] tag usage from the &amp;quot;Dragon&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=hunter_unit&lt;br /&gt;
             id=Rowck&lt;br /&gt;
             home_x,home_y=3,15&lt;br /&gt;
 &lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=5-30,1-15&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             rest_turns=2&lt;br /&gt;
             show_messages=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Swarm (animal_type=swarm) ===&lt;br /&gt;
&lt;br /&gt;
The Swarm Micro AI uses some very simply algorithms to simulate animal swarm behavior.  Without adjacent enemies, they simply do a random move, trying to stay together and at a certain distance from enemies.  However, if an enemy unit is close to any bat, the swarm scatters.  This is particular fun to watch when one places an enemy unit in the middle of the swarm.  After being scattered, the swarm members slowly rejoin, but not in a very organized way.  Sub-swarms or individual bats might roam around for quite some time before they find their way back.  It is also possible that individual bats (or small groups) split off from the larger swarm at times.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Swarm AI behavior, check out the &amp;quot;Swarm&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Swarm Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be 'swarm'.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''scatter_distance'''=3: (int) Enemies within &amp;quot;scatter_distance&amp;quot; hexes of any swarm unit cause the swarm to scatter, by each unit trying to maximize its individual distance from the enemy.&lt;br /&gt;
* '''enemy_distance'''=5: (int) The minimum distance kept between units of the swarm and enemies when the swarm moves as a whole.&lt;br /&gt;
* '''vision_distance'''=12: (int) Only units within this distance follow the overall swarm motion (either away from an enemy or of the swarm as a whole).  The smaller this value is set, the less likely the swarm is to stay together or rejoin.  This parameter is meant to simulate how far an individual member of the swarm can see, meaning that the swarm is &amp;quot;out of sight&amp;quot; (and the unit will not be able to follow it) if it is more than this distance away.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a Swarm [micro_ai] tag usage from the &amp;quot;Swarm&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=swarm&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Bottleneck Defense Micro AI (ai_type=bottleneck_defense) ==&lt;br /&gt;
&lt;br /&gt;
The Bottleneck Defense Micro AI lets you define a location on the map where the AI can take a defensive stance behind a narrow passage (bottleneck).  Units on the front line are backed up by healers and/or units with the leadership ability.  Injured units are moved to the back and replaced by uninjured (or less injured) units.  The units on the front line only attack when it is safe (no retaliation) or when there is a high chance that they will make a kill or level up.  Using this Micro AI only makes sense if there is no way for the enemy sides to move around the bottleneck and attack the AI's units from behind.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Bottleneck&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Bottleneck Defense Micro AI by putting&lt;br /&gt;
 {MICRO_AI_BOTTLENECK_DEFENSE}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=bottleneck_defense&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Bottleneck Defense specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
The Bottleneck Defense AI requires two sets of coordinates that define where it should be taking up its defensive stance, and from which side the enemy attacks at that location.&lt;br /&gt;
&lt;br /&gt;
* '''x,y''': Comma separated lists of the hexes on the front line, where strong units are placed.  All hexes on which the AI makes contact with (can be attacked by) the enemy need to be included here.  Units are placed on them in the order in which they are listed here.&lt;br /&gt;
* '''enemy_x,enemy_y''': Comma separated list of the hexes from which the enemy can attack the AI front line units.  This is needed for the AI to know on which side of the front line support units (healers etc.) need to be placed.  In many cases, it is sufficient to provide only one of the enemy front line hexes, but there are geometries for which that does not work.  It is therefore safer to list all enemy front line hexes here.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
By default, the AI places healers and units with the leadership ability both on the front line itself (if they are the strongest units available) and on hexes adjacent to and behind the line.  If different placement is desired, these locations can be overridden with the following keys.&lt;br /&gt;
&lt;br /&gt;
* '''healer_x,healer_y''': Comma separated list of hexes where healers are placed.  This can be used to keep healers from the front line (or to take up only certain positions on the front line), and/or to override the default healing positions behind the line.  Healers are placed on them in the order in which the hexes are listed, with the exception that hexes on the line always take priority over hexes behind the line.&lt;br /&gt;
* '''leadership_x,leadership_y''': Same as ''healer_x,healer_y'', but for units with the leadership ability.&lt;br /&gt;
* '''active_side_leader'''=no: (boolean)  If set to 'yes', the side leader participates in the bottleneck defense action after the side's gold has been spent.  If set to 'no' (default), the leader follows default AI behavior (sitting on the keep and recruiting, for the most part).&lt;br /&gt;
&lt;br /&gt;
As an example, in the &amp;quot;Bottleneck&amp;quot; scenario of the test scenario, there are three front line hexes, two of which are on hill terrain, while the third is a road with a lower defense rating.  The healer and side leader are supposed to participate in combat because they are strong units, but only from the hill hexes to keep them safer.  This is accomplished by using the following keys settings (check out the scenario to see which hex is which):&lt;br /&gt;
 [micro_ai]&lt;br /&gt;
     side=1&lt;br /&gt;
     ai_type=bottleneck_defense&lt;br /&gt;
     action=add&lt;br /&gt;
 &lt;br /&gt;
     x=14,14,14&lt;br /&gt;
     y= 7, 9, 8&lt;br /&gt;
     enemy_x=13,13&lt;br /&gt;
     enemy_y= 8, 9&lt;br /&gt;
 &lt;br /&gt;
     healer_x=14,14,15,15&lt;br /&gt;
     healer_y= 7, 9, 8, 9&lt;br /&gt;
     leadership_x=14,14,15,15&lt;br /&gt;
     leadership_y= 7, 9, 9 ,8&lt;br /&gt;
     active_side_leader=yes&lt;br /&gt;
 [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Generalized Goto Micro AI (ai_type=goto) ==&lt;br /&gt;
&lt;br /&gt;
'''*** Note: this Micro AI is available starting from Wesnoth 1.11.3 ***'''&lt;br /&gt;
&lt;br /&gt;
The Goto Micro AI provides a highly configurable method of sending a unit (or units) to a location or set of locations.  The units to be moved are defined using a [[StandardUnitFilter|Standard Unit Filter]] (SUF), while the goto locations are given in a [[StandardLocationFilter|Standard Location Filter]] (SLF).&lt;br /&gt;
&lt;br /&gt;
By default, each unit matching the SUF will move toward the closest goal (in terms of turns needed to get there) matching the SLF via the fastest route given the current situation on the map (locations of enemy units etc.), but this behavior can be influenced by the optional keys listed below.  Note that this means that a unit's goal might change from one turn to the next depending on the situation on the map.&lt;br /&gt;
&lt;br /&gt;
The behavior of the unit(s) once they reach their goal location(s) is configurable as well.  By default, they will stay there until the Goto Micro AI is deleted or changed.&lt;br /&gt;
&lt;br /&gt;
For demonstrations of several Goto Micro AI usages, check out the &amp;quot;Goto&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Goto Micro AI by putting&lt;br /&gt;
 {MICRO_AI_GOTO}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=goto&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Goto specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the units to be moved.&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the possible goal locations for the move.&lt;br /&gt;
&lt;br /&gt;
'''Keys required under certain circumstances:'''&lt;br /&gt;
* '''ca_id''': (string) If several Goto AIs are used for the same side and one or several of these are to be changed or deleted during the scenario, this key needs to be included so that the [micro_ai] tag knows which of them needs to be changed/deleted.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
Note: crossed-out keys have not been implemented yet, will come soon.&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;s&amp;gt;avoid_enemies&amp;lt;/s&amp;gt;'''=0: (non-negative number) By default, units controlled by the Goto Micro AI will not take enemy units into account for route finding, other than the enemies' ZoCs.  The larger the value of ''avoid_enemies'', the more units will try to stay out of the enemies' way.  (I will be more specific here once I have coded this, need to figure out how exactly it will work first).&lt;br /&gt;
* '''ca_score'''=210000: (non-negative integer) The evaluation score of the candidate action controlling this Micro AI.  By default, it is set to 210,000, which is higher than any of the [http://wiki.wesnoth.org/AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29 RCA AI candidate actions].  By setting it, for example, to 90,000, we can have it be executed after the combat CA, but before most of the other CAs which move units.  Maybe more importantly, this key can be used to determine which Goto Micro AI is executed first if several are defined for the same side.&lt;br /&gt;
* '''release_unit_at_goal'''=no: (boolean) By default, a unit that reaches a goal location will stay there until the Goto Micro AI is deleted or changed (or until the conditions specified in the [goto_goals] SLF change).  If this parameter is set, a unit that has reached its goal will not be controlled by this Micro AI any more starting from the next turn.&lt;br /&gt;
* '''release_all_units_at_goal'''=no: (boolean) Same as ''release_unit_at_goal'', but this will deactivate the Goto Micro AI for all units once the first unit reaches a goal.&lt;br /&gt;
* '''unique_goals'''=no: (boolean)  If set to 'yes', each unit will be sent to a different goal location.  Note that the best goals are recalculated each turn, so a unit might choose a different goal this turn from what it was heading for during the previous turn if the situation on the map has changed.  Also note that if there are more units than goal locations, the left over units will not be handled by the Goto MAI but follow default behavior instead.&lt;br /&gt;
* '''use_straight_line'''=no: (boolean)  By default, units choose the route by which they will get to their goal locations in the smallest number of turns.  If this parameter is set to 'yes', a straight line route (or something pretty close to it at least) will be chosen instead, irrespective of whether this leads into a dead end, whether it is blocked by enemies, etc.&lt;br /&gt;
&lt;br /&gt;
===Goto Micro AI example usages:===&lt;br /&gt;
&lt;br /&gt;
Here are several examples of goto [micro_ai] tag usages from the &amp;quot;Goto&amp;quot; test scenario:&lt;br /&gt;
* Send a unit toward a castle (similar to the RCA AI's Goto Candidate Action, but avoiding dead ends and areas ZoCed by enemies)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
             ca_id=messenger1&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 id=messenger1&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=6-7,2-4&lt;br /&gt;
                 terrain=C*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Send all gryphons of the side toward the southern border of the map (not yet included in the scenario)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Gryphon&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 y=33&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Send four bats to the four corners of the map (with each bat going to a different corner)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Vampire Bat&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x=1,1,44,44&lt;br /&gt;
                 y=1,33,1,33&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             unique_goals=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Set up a guardian unit that doesn't move while no enemy unit is within 8 hexes (ironically, the Goto Micro AI can be used to keep units in place, although using one of the Guardian Micro AIs might often be a better idea)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=3&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 id=guard1&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 [filter]&lt;br /&gt;
                     id=guard1&lt;br /&gt;
                 [/filter]&lt;br /&gt;
                 [not]&lt;br /&gt;
                     [filter]&lt;br /&gt;
                         side=1&lt;br /&gt;
                     [/filter]&lt;br /&gt;
                     radius=8&lt;br /&gt;
                 [/not]&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Guardian Micro AI (ai_type=guardian_unit) ==&lt;br /&gt;
The Guardian Micro AI attaches to an individual unit and can be used to set up different kind of guardian behaviors.  Three different types of guardians are available and are described below.&lt;br /&gt;
&lt;br /&gt;
Multiple guardian units can be used on the same side, by setting up a separate [micro_ai] tag for each unit.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of several different guardian behaviors, check out the &amp;quot;Guardians&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Guardians Micro AI by putting&lt;br /&gt;
 {MICRO_AI_GUARDIAN}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=guardian_unit&lt;br /&gt;
in the [micro_ai] tag.  The ''guardian_type='' key also needs to be set, as shown in the following.&lt;br /&gt;
&lt;br /&gt;
=== Return Guardian (guardian_type=return_guardian) ===&lt;br /&gt;
&lt;br /&gt;
A 'return guardian' is a variation of the standard Wesnoth guardian. It has an assigned guard position (GP) to which it returns after attacks on approaching enemies:&lt;br /&gt;
* If at GP with no enemy in reach, do nothing.&lt;br /&gt;
* If at GP with an enemy in reach, attack (note that the attack is done by default AI, which might result in the guardian not attacking if the enemy is deemed too strong).&lt;br /&gt;
* If not at GP, return there, no matter whether an enemy is in reach or not.&lt;br /&gt;
* If enemies are blocking the way back to GP, do your best to move around them.&lt;br /&gt;
* If the guardian ends up next to an enemy on the way back, attack that enemy after the move.&lt;br /&gt;
&lt;br /&gt;
You can configure each return guardian using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be set to &amp;quot;return_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''return_x,return_y''': The coordinate of the hex the unit returns to after each attack&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no optional keys.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a return guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=return_guardian&lt;br /&gt;
             id=return1&lt;br /&gt;
             return_x,return_y=20,2&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
===Stationed Guardian (guardian_type=stationed_guardian) ===&lt;br /&gt;
&lt;br /&gt;
A 'stationed guardian' is another variation of the standard Wesnoth guardian with a somewhat more complex behavior than that of the 'return guardian'. Two positions are defined for it, a 'station' and a 'guarded location', as well as a distance. The behavior is as follows:&lt;br /&gt;
* If no enemy is within 'distance' of the guard's current position, do nothing.  This is independent of the guardian being at its station or not.&lt;br /&gt;
* Otherwise: If an enemy is within 'distance' of the guard, but not also within the same distance of the guarded location and the station (all of this simultaneously), move the guard in the direction of the station.&lt;br /&gt;
* Otherwise:&lt;br /&gt;
** Pick the enemy unit that is closest to the guarded location.&lt;br /&gt;
** If we can reach it, pick the adjacent hex with the highest defense rating and attack from there.&lt;br /&gt;
** If not in reach, move toward this unit.&lt;br /&gt;
&lt;br /&gt;
You can configure each stationed guardian using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;stationed_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''distance''': The distance parameter as explained above&lt;br /&gt;
* '''station_x,station_y''': The x and y position of the hex that serves as the guardians station.&lt;br /&gt;
* '''guard_x, guard_y''': The x and y position of the guarded location.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no optional keys.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a stationed guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=stationed_guardian&lt;br /&gt;
             id=stationed1&lt;br /&gt;
             distance=4&lt;br /&gt;
             station_x,station_y=2,14&lt;br /&gt;
             guard_x,guard_y=3,13&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Coward (guardian_type=coward) ===&lt;br /&gt;
&lt;br /&gt;
Cowards are units that, like guardians, sit around doing nothing until an enemy comes into range.  Unlike guardians, however, they run away once enemies approach. Applications might be wild animals, unarmed civilians getting in the way of a battle, etc.  The coward macro can be called with two optional locations, 'seek' and 'avoid':&lt;br /&gt;
* If neither is given, the coward retreats to the position farthest away from the approaching enemies.&lt;br /&gt;
* If 'seek' is given, it preferentially goes toward that location (but getting away from enemies takes priority).&lt;br /&gt;
* If 'avoid' is given, it in addition tries to avoid that location (with both maximizing distance from enemies and going toward 'seek' taking priority).&lt;br /&gt;
* Both 'seek' and 'avoid' may consist of only one coordinate ('x' or 'y'), in which case not a single hex, but a line of hexes is sought or avoided.&lt;br /&gt;
&lt;br /&gt;
You can configure each coward using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;coward&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''distance''': The distance within which an enemy must be to &amp;quot;scare&amp;quot; the unit&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''seek_x, seek_y''': The x and y coordinate of the hex to seek&lt;br /&gt;
* '''avoid_x, avoid_y''': The x and y coordinate of the hex to avoid&lt;br /&gt;
&lt;br /&gt;
Here's an example of a coward [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=coward&lt;br /&gt;
             id=coward3&lt;br /&gt;
             distance=5&lt;br /&gt;
             seek_x,seek_y=24,5&lt;br /&gt;
             avoid_x,avoid_y=24,15&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Zone guardian (guardian_type=zone_guardian) ===&lt;br /&gt;
&lt;br /&gt;
'''*** Note: this Micro AI is available starting from Wesnoth 1.11.3 ***'''&lt;br /&gt;
&lt;br /&gt;
A zone guardian is a unit that, as the name says, guards a zone. It moves randomly inside this zone until an enemy enters it (or a separately defined enemy zone, see below). Applications might be the defense of a castle or a nesting area.  The zone macro can be called with an optional SLF, [filter_location_enemy]:&lt;br /&gt;
* If not specified, the zone guard attacks any enemy coming inside its guard zone.&lt;br /&gt;
* If [filter_location_enemy] is given, it attacks any enemy entering this zone and once there are no more enemies, it goes back to patrol in its basic zone.&lt;br /&gt;
&lt;br /&gt;
You can configure each zone guardian using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;zone_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''[filter_location]''': A [[StandardUnitFilter|Standard Unit Filter]] designating the zone to guard.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''[filter_location_enemy]''': A [[StandardUnitFilter|Standard Unit Filter]] designating the zone where enemies have to be attacked.  If not given, it defaults to [filter_location].&lt;br /&gt;
&lt;br /&gt;
Here's an example of a zone guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=zone_guardian&lt;br /&gt;
             id=zone3&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=22-31,4-11  # This is intentionally chosen to extend past the lake&lt;br /&gt;
                 terrain=W*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Healer Support Micro AI (ai_type=healer_support) ==&lt;br /&gt;
&lt;br /&gt;
The Healer Support Micro AI configures the healers of a side to stay behind the battle lines and heal injured and/or threatened units rather than participate in combat under all circumstances.  You can set different levels of aggressiveness for the healers.  Note that it is not always better to use this Micro AI than the default AI, as it takes healers (which can be strong units) away from the pool of units to choose for attacks.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Healers&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Healer Support Micro AI by putting&lt;br /&gt;
 {MICRO_AI_HEALER_SUPPORT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=healer_support&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Healer Support specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no required keys.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the healer units.  If set, only units passing this filter ''and'' having the healing ability are considered by this Micro AI.  '''Available from Wesnoth 1.11.3'''&lt;br /&gt;
*'''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting units to receive healing. If set, only units passing this filter ''and'' the other healee selection filters will be selected for healing by this Micro AI.  '''Available from Wesnoth 1.11.3'''&lt;br /&gt;
* '''aggression'''=1.0: (float) Sets the aggressiveness of the AI.  This parameter is set up as a float to accommodate future functionality, but it currently acts as a boolean: if set to zero, the AI will never let its healers participate in combat, for all other values it allows them to attack after all other units have attacked and if the healers cannot find any more units to support.  The former behavior might be appropriate in scenarios with only one or few valuable healers, while the latter might work better in scenarios with many healers.&lt;br /&gt;
* '''injured_units_only'''=no: (boolean) If set to 'yes', the AI will only move healers next to units that are already injured and skip units that currently have full hitpoints, but might get injured during the next enemy turn.&lt;br /&gt;
* '''max_threats'''=9999: (integer) The maximum allowable number of enemies that can attack a hex in order for it to be considered for a healer.  As an example, setting 'max_threats=0' means that the AI only moves healers to locations that are entirely safe from the enemy (assuming that none of the units currently on the map dies).  Note that the value of this key is checked against the number of enemies that can make it to the hex, not the number of adjacent hexes from which the healer could be attacked.&lt;br /&gt;
&lt;br /&gt;
'''Standard RCA AI aspects respected by this Micro AI:'''&lt;br /&gt;
*'''[avoid]''': The standard RCA AI aspect used to define terrain that should be avoided by the AI. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Healer Support Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].&lt;br /&gt;
&lt;br /&gt;
This is an example of a Healer Support Micro AI configuration:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=healer_support&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             aggression=0&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Lurkers Micro AI (ai_type=lurkers) ==&lt;br /&gt;
&lt;br /&gt;
The Lurker Micro AI controls some or all units of a side in &amp;quot;lurker mode&amp;quot;.  A lurker is a unit that is capable of moving across most terrains, but that only stops on and attacks from specific terrain.  It might also have the ability to hide on this terrain (which is the reason why it is called a lurker).&lt;br /&gt;
&lt;br /&gt;
Lurkers move individually without strategy and always attack the weakest enemy within their reach.  If no enemy is in reach, the lurker does a random move instead - or it just sits and waits (lurks).&lt;br /&gt;
&lt;br /&gt;
For a demonstration of different types of lurker behavior, check out the &amp;quot;Lurkers&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Lurkers Micro AI by putting&lt;br /&gt;
 {MICRO_AI_LURKERS}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=lurkers&lt;br /&gt;
in the [micro_ai] tag&lt;br /&gt;
&lt;br /&gt;
===Lurkers specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
* '''[filter]''': Specifies which units of the side are controlled by the Lurker Micro AI.  This is a [[StandardUnitFilter|Standard Unit Filter]].  '''Note: this was called [lurkers] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': Specifies the terrain from which the lurkers attack. This is a [[StandardLocationFilter|Standard Location Filter]].  '''Note: this was called [attack_terrain] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''[filter_location_wander]''': Specifies the terrain on which lurkers end their moves if there is no enemy in reach. This is a [[StandardLocationFilter|Standard Location Filter]].  If [filter_location_wander] is not given, it defaults to [filter_location].  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''stationary'''=no: (boolean)  If set to yes, a lurker never moves if there is no enemy within attack range.&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Lurkers&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=4&lt;br /&gt;
             ai_type=lurkers&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Naga Fighter&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=W*,S*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             [filter_location_wander]&lt;br /&gt;
                 terrain=W*&lt;br /&gt;
             [/filter_location_wander]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Messenger Escort Micro AI (ai_type=messenger_escort) ==&lt;br /&gt;
&lt;br /&gt;
The Messenger Escort Micro AI lets you define a set of waypoints through which it tries to move one of its units, the messenger.  The other units escort the messenger, trying to protect it and attacking enemies that are in its way.  Note that the messenger might not strictly hit intermediate waypoints, but that getting close is good enough, especially if a waypoint is occupied by an enemy unit.  It does, however, always try to get to the last waypoint. &lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Messenger&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Messenger Escort Micro AI by putting&lt;br /&gt;
 {MICRO_AI_MESSENGER_ESCORT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=messenger_escort&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Messenger Escort specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''id''': The id of the messenger.  All other units of the side protect the messenger.&lt;br /&gt;
* '''waypoint_x,waypoint_y''': Comma-separated list of waypoint coordinates through which the messenger will go in the given order to reach its goal, given by the last coordinate.  If you want the messenger to go directly to the goal, simply enter a single x,y coordinate here.  Note that the messenger does not have to hit each waypoint exactly (except for the final one), getting close to them is good enough.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''enemy_death_chance'''=0.67 and '''messenger_death_chance'''=0.0: (both floats; ranging from 0 to 1)    If the messenger is adjacent to an enemy at the end of the move, it will only attack the enemy if the chance of death of the enemy is &amp;gt;= enemy_death_chance and if the messenger's chance of death is &amp;lt;= messenger_death_chance (or if it is an attack at a range for which the enemy does not have a weapon).&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Messenger Escort&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=messenger_escort&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             id=messenger&lt;br /&gt;
             waypoint_x=31,24,27,28&lt;br /&gt;
             waypoint_y=20,14,7,1&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Patrol Micro AI (ai_type=patrol_unit) ==&lt;br /&gt;
&lt;br /&gt;
The Patrol Micro AI attaches to an individual unit and defines a number of waypoints for that unit to follow.  Options can be set whether the route should be followed in a loop, as an out-and back, only once, whether units encountered along the way should be attacked, etc.&lt;br /&gt;
&lt;br /&gt;
No matter what options are chosen, getting to the next waypoint always takes priority over attacking for a patroller.  The AI thus prefers to move the patrol unit around enemies rather than straight for them.  Also, if a waypoint is occupied by a unit the AI is not instructed to attack, it will (eventually) abandon that waypoint once it gets close enough and move on to the next one.&lt;br /&gt;
&lt;br /&gt;
Multiple patrol units can be used on the same side, by setting up a separate [micro_ai] tag for each unit.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of several different patrol behaviors, check out the &amp;quot;Patrols&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Patrol Micro AI by putting&lt;br /&gt;
 {MICRO_AI_PATROL}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=patrol_unit&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The [micro_ai] tag needs to be placed after the creation of the unit it controls in the scenario event.'''&lt;br /&gt;
&lt;br /&gt;
===Patrol specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''id''': The id of the patrol unit.&lt;br /&gt;
* '''waypoint_x,waypoint_y''': Comma-separated lists of the waypoint coordinates through which the patrol travels (in order).&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''out_and_back'''=no: (boolean)  By default, a patrol unit returns to the first waypoint after reaching the last, doing the patrol route as a loop.  If this parameter is set to 'yes', the unit instead reverses its course and perpetually does out and backs of the route.&lt;br /&gt;
* '''one_time_only'''=no: (boolean)  If set to 'yes', the unit goes through the patrol route only once and then hangs out at the last waypoint.  It also always attacks any enemy unit on the last waypoint, independent of what ''attack='' is set to.&lt;br /&gt;
* '''attack''': By default (if this key is not set), the patrol unit attacks any unit it ends up next to after a move.  Alternatively, this parameter can be set to a comma-separated list of unit ids. If that is done, the patrol only attacks these units when it ends up next to them and ignores any other unit.  This can in turn be used to have the patroller not attack at all, by setting ''attack='' to a non-existing id.&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Patrols&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=patrol_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             id=Konrad&lt;br /&gt;
             waypoint_x=9,24,25&lt;br /&gt;
             waypoint_y=21,23,15&lt;br /&gt;
             one_time_only=yes&lt;br /&gt;
             attack=Gertburt&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Protect Unit Micro AI (ai_type=protect_unit) ==&lt;br /&gt;
&lt;br /&gt;
The Protect Unit Micro AI tries to move one or several units to a given location while keeping them safe from enem attacks. It does so by keeping the protected units away from enemy units and close to friendly units. Other units on the AI side are controlled by the default Wesnoth AI.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Protect Unit&amp;quot; and &amp;quot;The Elves Besieged&amp;quot; scenarios from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Protect Unit Micro AI by putting&lt;br /&gt;
 {MICRO_AI_PROTECT_UNIT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=protect_unit&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Protect Unit specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[unit]''': A separate [unit] tag is required for each protected unit(s).  Each tag has required keys id=, goal_x=, goal_y= for each unit, as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''disable_move_leader_to_keep'''=no: (boolean) If set to 'yes', side leaders protected by this AI do not try to return to their keep.  This is necessary for this Micro AI to work with units that are side leaders and that are supposed to move to an off-keep location.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Protect Unit Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].  Depending on the parameters, it might also modify the [[AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29|move leader to keep candidate action]].&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;HttT: The Elves Besieged&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             # Required keys of [micro_ai] tag&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=protect_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [unit]&lt;br /&gt;
                 id=Delfador&lt;br /&gt;
                 goal_x,goal_y=1,2&lt;br /&gt;
             [/unit]&lt;br /&gt;
             [unit]&lt;br /&gt;
                 id=Konrad&lt;br /&gt;
                 goal_x,goal_y=1,1&lt;br /&gt;
             [/unit]&lt;br /&gt;
 &lt;br /&gt;
             disable_move_leader_to_keep=true&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Recruiting Micro AI (ai_type=recruiting) ==&lt;br /&gt;
&lt;br /&gt;
The Recruiting Micro AI replaces the default recruitment AI by alternative recruiting patterns.  Currently there are two recruiting algorithms you can choose from, random recruiting and the rush recruiting used in the new (as of Version 1.11.1) Experimental AI (see below).&lt;br /&gt;
&lt;br /&gt;
For a demonstration of a different recruiting pattern, check out the &amp;quot;Recruiting&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.  You can also explore the unit choices by watching the Experimental AI in a multiplayer game.&lt;br /&gt;
&lt;br /&gt;
Enable the Recruiting Micro AI by putting&lt;br /&gt;
 {MICRO_AI_RECRUITING}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=recruiting&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Obviously, the Recruitment Micro AI modifies the [[AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29|recruitment candidate action]].&lt;br /&gt;
&lt;br /&gt;
=== Random Recruitment AI (recruiting_type=random) ===&lt;br /&gt;
&lt;br /&gt;
This AI randomly selects a unit type from the recruitment list of the side.  The probability of choosing each type and the behavior in low-gold situations can be influenced with optional parameters.&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''recruiting_type''': Must be &amp;quot;random&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[probability]''': This tag sets the probability of selecting the given unit type.  It has two required sub-keys:&lt;br /&gt;
** '''type''': comma-separated list of unit types to which this probability is to be applied&lt;br /&gt;
** '''probability''': (non-negative float)  The probability with which these unit types is to be selected.  All unit types for which no [probability] tag is defined receive a default probability of 1.0, thus values should be chosen relative to that.  As an example, in the code below swordsmen and peasants are given a probability of 8, while no other units have assigned probabilities.  Thus, each of these two unit types is 8 times more likely to be selected than any other individual unit type.&lt;br /&gt;
* '''skip_low_gold_recruit'''=no: (boolean)  By default, the random recruitment AI chooses a unit to recruit only from those types for which it has sufficient gold.  If this parameter is set to 'yes', it will instead choose from all available unit types and end recruiting for the turn if there is not enough gold to recruit it this turn (even if other, affordable unit types exist).&lt;br /&gt;
&lt;br /&gt;
Here's an example of a random recruiting [micro_ai] tag usage from the &amp;quot;Recruiting&amp;quot; test scenario: &lt;br /&gt;
&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=recruiting&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             recruiting_type=random&lt;br /&gt;
             [probability]&lt;br /&gt;
                 type=Swordsman,Peasant&lt;br /&gt;
                 probability=8&lt;br /&gt;
             [/probability]&lt;br /&gt;
 &lt;br /&gt;
             skip_low_gold_recruiting=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Rush Recruitment AI (recruiting_type=rushers) ===&lt;br /&gt;
&lt;br /&gt;
This AI replaces the default recruiting with the rush recruiting used in the new (as of Version 1.11.1) Experimental AI.&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''recruiting_type''': Must be &amp;quot;rushers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''randomness'''=0.1: (number)  A random number is applied to the rusher recruit engine's score to prevent the recruitment pattern from being too predictable. 0 causes no randomness to be applied, while larger numbers increase the random effect. A value of 1-2 generates results in which the random effect is approximately equal to the scored effect. Extremely high values are essentially entirely random.&lt;br /&gt;
&lt;br /&gt;
Rush recruiting is set up like this:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=recruiting&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             recruiting_type=rushers&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Other Potential Micro AIs ==&lt;br /&gt;
&lt;br /&gt;
The following Micro AIs might be added at some point.  Feel free to add to this list, if you have other ideas.&lt;br /&gt;
&lt;br /&gt;
* Leader support&lt;br /&gt;
* Targeted enemy poisoning&lt;br /&gt;
* Protect unit/location/area&lt;br /&gt;
* Annoying AI (grab targets and avoid fights as much as possible)&lt;br /&gt;
* Orderly retreat&lt;br /&gt;
&lt;br /&gt;
[[Category:AI]]&lt;/div&gt;</summary>
		<author><name>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Micro_AIs&amp;diff=51043</id>
		<title>Micro AIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Micro_AIs&amp;diff=51043"/>
		<updated>2013-05-14T20:21:51Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Healer Support specific keys for the [micro_ai] tag: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirco AIs allow Wesnoth campaign and scenario authors to add new AI functionality without the need for any AI programming.  A Micro AI is activated and configured (or deleted) via the [micro_ai] tag, requiring only a few lines of WML code.  Note that this is a new functionality and theat '''we are very much looking for feedback''' on bugs, new feature requests for the existing AIs or ideas for new Micro AIs.&lt;br /&gt;
&lt;br /&gt;
Micro AIs are available in mainline Wesnoth '''starting from Version 1.11.2'''.  Additional AIs that are still in an experimental stage are available in the ''AI Modification Demos'' add-on, which also might contain more advanced (development) versions of the mainline Micro AIs.&lt;br /&gt;
&lt;br /&gt;
== A Few General Words about Micro AIs ==&lt;br /&gt;
&lt;br /&gt;
* Micro AIs are meant to bring new specialized behavior to Wesnoth that cannot be achieved, at least not easily, by adjusting default AI parameters (such as those described at [[AiWML]]) or with WML code.&lt;br /&gt;
&lt;br /&gt;
* Most Micro AIs in their default setting apply to all units of a side, although many of them provide parameters for filtering the units that should be affected by the new behavior.  If the Micro AI is applied only to part of the units of a side, the other units follow the default Wesnoth AI behavior.&lt;br /&gt;
&lt;br /&gt;
* By contrast, a few Micro AIs attach directly to a unit and only affect that unit's behavior.  These are so-called [[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|Behavior Candidate Actions]] (BCAs).  This type of Micro AI has an [[Micro_AIs#2._Activating_and_configuring_.28or_deleting.29_a_Micro_AI|ai_type=]] value ending in ''_unit'', in order to distinguish it from the side-wide Micro AIs.&lt;br /&gt;
&lt;br /&gt;
=== Micro AI Test and Demo Scenarios ===&lt;br /&gt;
&lt;br /&gt;
All Micro AIs described here can be checked out in a number of test and demo scenarios.  Test scenarios can be accessed from the command line by typing&lt;br /&gt;
 path/wesnoth-executable -t micro_ai_test&lt;br /&gt;
This starts up a &amp;quot;switchboard scenario&amp;quot; in which you can select the Micro AI demonstration scenario you want to check out.  Here, ''path/wesnoth-executable'' needs to be replaced by whatever the path and filename of the Wesnoth executable is on your system.&lt;br /&gt;
&lt;br /&gt;
Another way to test the Micro AIs (as well as some other AIs still under development) is to download the ''AI Modification Demos'' add-on.  All the test/demo scenarios are also available there.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Micro AI ==&lt;br /&gt;
&lt;br /&gt;
Setting up a Micro AI is done in two simple steps:&lt;br /&gt;
&lt;br /&gt;
==== 1. Enabling the Micro AI functionality in the [side] tag ====&lt;br /&gt;
&lt;br /&gt;
The desired AI functionality needs to be enabled for a side before it can be used.  This is done by including a single macro line inside the [side] tag, such as:&lt;br /&gt;
     {MICRO_AI_HEALER_SUPPORT}&lt;br /&gt;
The exact macro name depends on the specific Micro AI and is given below for each AI.  This macro must be put '''directly into the [side] tag''', it does not go inside an [ai] tag.  This step does not yet activate the Micro AI, it simply sets up the desired functionality.&lt;br /&gt;
&lt;br /&gt;
==== 2. Activating and configuring (or deleting) a Micro AI ====&lt;br /&gt;
&lt;br /&gt;
Micro AIs are activated, deleted and configured using the [micro_ai] tag.  This tag needs to be placed in [[ActionWML]], that is, in an event, a menu option or the like.  As an example, the following code activates the healer_support Micro AI in its default configuration for Side 2 from the beginning of the scenario:&lt;br /&gt;
     [event]&lt;br /&gt;
         name=prestart&lt;br /&gt;
 &lt;br /&gt;
         # Configure the healer support micro AI&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=healer_support&lt;br /&gt;
             action=add&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
     [/event]&lt;br /&gt;
All [micro_ai] tags must contain the following three (or four) required keys:&lt;br /&gt;
* '''side''': The side for which the Micro AI is to be added, changed or deleted&lt;br /&gt;
* '''ai_type''': The type of Micro AI to be added, changed or deleted.  See the following sections for allowed values.&lt;br /&gt;
* '''action''' (string): The action to take concerning the Micro AI.  The following values are allowed: &lt;br /&gt;
** ''add'': Add a Micro AI to a side.&lt;br /&gt;
** ''change'': Change the configuration of an existing Micro AI.  Note that this does not only change the specific parameters provided in the tag, but it replaces the entire existing Micro AI by a new version with the new (and only the new) configuration.  It is therefore equivalent to using first the ''delete'' and then the ''add'' action.&lt;br /&gt;
** ''delete'': Delete an existing Micro AI from a side.&lt;br /&gt;
* '''id''': If the Micro AI attaches directly to a unit, rather than being side-wide, the id of the unit is also a required parameter.&lt;br /&gt;
&lt;br /&gt;
Other keys may also be required depending on the Micro AI.  In additional, a number of optional keys may be available to configure the AI behavior.  See the following sections on the individual Micro AIs for details.&lt;br /&gt;
&lt;br /&gt;
'''Notes:''' &lt;br /&gt;
* The ''add'' and ''change'' actions ignore all keys that do not apply to the respective Micro AI type.  The ''delete'' action ignores all keys other than the three (or four) required keys listed here.&lt;br /&gt;
&lt;br /&gt;
* Some of the Micro AIs use and/or modify default AI components (candidate actions or aspects) when they are added, or reset these components to their default values when they are deleted.  Thus, if you have modified the AI yourself using the default CAs or aspects, some of these modifications might be affected, or might be interfering with the Micro AI.  The sections below indicate whether a Micro AI modifies any default AI components.&lt;br /&gt;
&lt;br /&gt;
* It is currently not possible to combine different Micro AI types (AIs using different values of ai_type=) on the same side.  In other words, you can use several guardians (and even different guardian types) on the same side (as they are all handled by the Guardian Micro AI), but it is not possible to put, for example, guardians and patrollers on the same side.  This restriction will be lifted in an upcoming release.  In the meantime, you will have to use different (allied) sides to accomplish this.&lt;br /&gt;
&lt;br /&gt;
== Animals Micro AI (ai_type=animals) ==&lt;br /&gt;
&lt;br /&gt;
The Animals Micro AIs are meant to simulate the behaviors of certain types of animals.  They are, however, set up so that they can be used with arbitrary unit types and might be applicable in quite diverse situations.  The AIs nevertheless remain named after the animals for which they were written originally, so that they are (to some extent) descriptive of their behavior.&lt;br /&gt;
&lt;br /&gt;
Brief descriptions of the AI behaviors are given in the following subsections.  To get a better feeling for their behavior, check out the &amp;quot;Animals&amp;quot;, &amp;quot;Swarm&amp;quot;, &amp;quot;Wolves&amp;quot; and &amp;quot;Dragon&amp;quot; scenarios from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.  Note that some of the animal AIs are designed for animal types that do not exist in mainline.  In the test scenario, other animal types are therefore substituted for them.  If you want to see them with the animal types for which they were written, check out the ''AI Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable an Animals Micro AI by putting&lt;br /&gt;
 {MICRO_AI_ANIMALS}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=animals&lt;br /&gt;
in the [micro_ai] tag. The ''animal_type='' tag is then used to select the desired animal AI.&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Wolves (animal_type=wolves) ===&lt;br /&gt;
&lt;br /&gt;
The Wolves Micro AI organizes all &amp;quot;wolf&amp;quot; units (predators) of the side to hunt in a single pack.  They actively chase after the closest prey and try to corner it (not always super successfully), but are easily distracted by other prey coming into range, to the point where the pack splits up.  The wolves can also be told to try to avoid other types of units (such as larger predators), except when they are going in for an attack.  When no prey is left, the wolves wander randomly.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Wolves AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Note that another wolves AI exists, called [[Micro_AIs#Animals_AI:_Multi-pack_Wolves_.28animal_type.3Dwolves_multipacks.29|Multipack Wolves]], which distributes the wolves of a side into several packs, rather than all of them into one single pack as it is done here.&lt;br /&gt;
&lt;br /&gt;
You can configure the Wolves Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;wolves&amp;quot;.&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the predator units.  '''Note: this was called [predators] in 1.11.2'''&lt;br /&gt;
* '''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the prey units.  '''Note: this was called [prey] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''avoid_type''': Comma-separated list of unit types which the wolves try to avoid&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Wolves Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].&lt;br /&gt;
&lt;br /&gt;
Here's an example of a wolves [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=6&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=wolves&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Wolf&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_second]&lt;br /&gt;
                 type=Deer&lt;br /&gt;
             [/filter_second]&lt;br /&gt;
             avoid_type=Yeti,Giant Spider,Tarantula,Bear,Dog&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Multi-pack Wolves (animal_type=wolves_multipacks) ===&lt;br /&gt;
&lt;br /&gt;
The Multi-pack Wolves Micro AI is different from the [[Micro_AIs#Animals_AI:_Wolves_.28animal_type.3Dwolves.29|Wolves Micro AI]] in that there can be an arbitrary number of wolf packs, with the pack size being a free parameter.  At the beginning of the scenario, close wolves are grouped into packs in a semi-methodical way.  If the wolves are put on the map in distinct groups of close wolves of the correct number, they will be joined into packs matching these groups.  If, on the other hand, they are spread out all over the map, the method of assigning them to packs is semi-random.&lt;br /&gt;
&lt;br /&gt;
Wolves of the same pack begin by joining each other on the map.  After that, they stay together until only one wolf is left, which then tries to join up with an incomplete pack or with other single wolves.  Individual wolves entering the map during the scenario behave in that way as well.&lt;br /&gt;
&lt;br /&gt;
A second difference to the other Wolves AI is that wolves do not actively hunt here.  For the most part they just wander (often long distance).  However, the pack ferociously (and without regard for its own health) attacks any enemy units that come into range, as long as that does not mean separating the pack by more than a few hexes.  Staying together, or joining with a new wolf assigned to the pack, is the only thing that takes priority over satisfying the wolves' thirst for blood.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Multi-pack Wolves AI behavior, check out the &amp;quot;Wolves&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Multi-pack Wolves Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;wolves_multipacks&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''type'''=Wolf: Comma-separated list of the unit types which the AI controls. The default value is &amp;quot;Wolf&amp;quot;.&lt;br /&gt;
* '''pack_size'''=3: (integer) The size of the packs.&lt;br /&gt;
* '''show_pack_number'''=no: If set to &amp;quot;yes&amp;quot;, the wolves' pack numbers will be shown below them.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a wolves_multipacks [micro_ai] tag usage from the &amp;quot;Wolves&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=wolves_multipacks&lt;br /&gt;
             show_pack_number=yes&lt;br /&gt;
             pack_size=4&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Big Animals (animal_type=big_animals) ===&lt;br /&gt;
&lt;br /&gt;
The Big Animals Micro AI is a simulation of large predators that wander and hunt alone, such as Bears, Giant Spiders or Yetis.  For the most part, these just wander on the terrain that's been defined for them, but they attack enemy units if those happen to come into range.  The AI can be set up so that the Big Animals stay out of the way of other units (such as other large predators), in which case they only attack those if cornered.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Big Animals AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Big Animals Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;big_animals&amp;quot;&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the animals to which this AI is applied.  '''Note: this was called [big_animals] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': The big animals often go for long distance (multi-turn) journeys.  This tag is a [[StandardLocationFilter|Standard Location Filter]] describing the terrain from which the next goal is chosen.  The default is all terrain on the map.  '''Note: this was called [goal_terrain] in 1.11.2'''&lt;br /&gt;
* '''[filter_location_wander]''': The terrain on which the big animals will end their moves. This is a [[StandardLocationFilter|Standard Location Filter]].  The default is all terrain on the map.  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''[avoid_unit]''': A [[StandardUnitFilter|Standard Unit Filter]] describing all enemy units that the big animals will avoid.  Note that the condition that this must be enemy units is added by the AI automatically and does not need to be included in the filter.&lt;br /&gt;
&lt;br /&gt;
Here's an example of big_animals [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=3&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=big_animals&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Bear&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [avoid_unit]&lt;br /&gt;
                 type=Yeti,Giant Spider,Tarantula,Bear,Dog&lt;br /&gt;
             [/avoid_unit]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=1-40,1-18&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             [filter_location_wander]&lt;br /&gt;
                 terrain=*&lt;br /&gt;
             [/filter_location_wander]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Forest Animals (animal_type=forest_animals) ===&lt;br /&gt;
&lt;br /&gt;
The Forest Animals Micro AI simulates a number of different animal behaviors that one might find in a forest, namely animals behaving like deer, rabbits and families of tuskers.  In the following, we will refer to those animals by these types, even though the actual unit types can be selected freely.  They behave as follows:&lt;br /&gt;
* Each deer wanders randomly on (selectable) terrain, except when enemies get in its (the deer's) maximum movement range, in which case it flees to the farthest point it can reach.&lt;br /&gt;
* Tuskers exhibit the same behavior as deer, except when an enemy is next to one of the tusklets.  This enemy is attacked unconditionally by the tuskers trying to protect their young.&lt;br /&gt;
* Tusklets blindly follow the closest adult tusker, except when there is no tusker left, in which case they behave the same as deer.&lt;br /&gt;
* Rabbits also wander randomly, but in addition disappear into their holes (if any are within reach) when enemies are close.  They reappear out of their holes at the beginning of the turn, if it is safe.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Forest Animals AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the test scenario or in the AI Modification Demos add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Forest Animals Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;forest_animals&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''rabbit_type, tusker_type, tusklet_type, deer_type''': Comma-separated lists of the unit types behaving as the respective animals.  If any of these parameters are not set, those types of animal behavior are skipped by the AI.&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the terrain on which the forest animals wander when they are not threatened by enemies.  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''rabbit_number'''=6: (integer)  The number of rabbits for the AI to have on the map simultaneously.  The AI puts the missing number of rabbits onto the map at the beginning of the AI's turn (when the rabbits come out of their holes).&lt;br /&gt;
* '''rabbit_enemy_distance'''=3: (number)  Rabbits won't spawn in holes that aren't more than this distance away from all enemies.&lt;br /&gt;
* '''rabbit_hole_img''': Rabbit holes are marked by items on the map.  If this parameter is set, it must be the file name of the item image.  If it is not set, all items on the map are treated as rabbit holes.&lt;br /&gt;
&lt;br /&gt;
Here's an example of forest_animals [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=forest_animals&lt;br /&gt;
             deer_type=Deer&lt;br /&gt;
             rabbit_type=Rabbit&lt;br /&gt;
             tusker_type=Tusker&lt;br /&gt;
             tusklet_type=Tusklet&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=*^F*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Herd and Herders (animal_type=herding) ===&lt;br /&gt;
&lt;br /&gt;
The Herding Micro AI sets up an area on the map where a number of herder units (such as sheep dog) control and protect a herd (such as sheep).  For convenience, we simply refer to them as sheep dogs and sheep in the following, even though arbitrary unit types can be selected for either.&lt;br /&gt;
&lt;br /&gt;
Sheep dogs try to keep their sheep safe.  This involves keeping them inside the herding area, positioning themselves in between the sheep and approaching enemies, and attacking the enemies if those get too close.  If no active herding or protecting move is needed, the dogs go to a random location on the perimeter of the herding area.&lt;br /&gt;
&lt;br /&gt;
Sheep wander aimlessly except when a sheep dog is next to them, in which case they run away from the dog.  The dogs exploit this by positioning themselves on the outside of the sheep, if possible.  Sheep also run away from approaching enemies.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Herding AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Herding Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;herding&amp;quot;&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] describing the herder units (e.g. dogs).  '''Note: this was called [herders] in 1.11.2'''&lt;br /&gt;
* '''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] describing the herd units (e.g. sheep).  '''Note: this was called [herd] in 1.11.2'''&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the terrain forming the perimeter of the herding area.  In other words, this is the path the herders (dogs) use to patrol around the outside of the herding area.  This must be a set of coordinates ''completely enclosing'' the herding area.  '''Note: this was called [herding_perimeter] in 1.11.2'''.  Here's an example of setting up a rectangular perimeter:&lt;br /&gt;
     [filter_location]&lt;br /&gt;
         x=10-20,10-20,10,  ,20&lt;br /&gt;
         y=11,   21,   11-21,11-21&lt;br /&gt;
     [/filter_location]&lt;br /&gt;
Another possibility is by defining the path by certain terrain on the map (as it is done in the &amp;quot;Animals&amp;quot; test scenario), in which case the filter can simply look like this:&lt;br /&gt;
     [filter_location]&lt;br /&gt;
         terrain=Rb&lt;br /&gt;
     [/filter_location]&lt;br /&gt;
* '''herd_x,herd_y''': The coordinate of one hex (''any'' one hex) inside the herding area.  This is needed to define which part of the map is on the ''inside'' of the herding area perimeter defined by [herding_perimeter], and which is the ''outside''.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''attention_distance'''=8: (integer)  If an enemy is within this distance of a herd unit, but not as close as ''attack_distance'', the herders try to position themselves in between the enemy and the herd unit.&lt;br /&gt;
* '''attack_distance'''=4: (integer)  If an enemy is within this distance of a herd animal, the herders attack this enemy.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a Herding [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=herding&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Dog&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_second]&lt;br /&gt;
                 type=Sheep,Ram&lt;br /&gt;
             [/filter_second]&lt;br /&gt;
             herd_x,herd_y=32,28&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=Rb&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Hunter (animal_type=hunter_unit) ===&lt;br /&gt;
&lt;br /&gt;
The Hunter Micro AI attaches to an individual unit which it leads through hunt-and-rest cycles.  The unit wanders in a prescribed area of the map, its hunting ground, until an enemy unit comes within range.  Note that it does not actively chase down enemies, but wanders randomly through its hunting ground until an enemy is encountered.&lt;br /&gt;
&lt;br /&gt;
If enemies are within range, the hunter attacks the weakest of them.  If a kill is made, it then retreats to its rest location, where it stays for a certain number of turns or until fully healed.&lt;br /&gt;
&lt;br /&gt;
A few more details:&lt;br /&gt;
* If the hunter's way home is entirely blocked on the return (so that there is no possible path), the normal RCA AI takes over its behavior.&lt;br /&gt;
* However, if the way is blocked by an enemy unit occupying the rest hex, that enemy will be attacked unconditionally.&lt;br /&gt;
* A kill only makes the hunter go home when it is the attacker, not as defender.&lt;br /&gt;
&lt;br /&gt;
Multiple hunter units can be used on the same side, by setting up a separate [micro_ai] tag for each unit. &lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Hunter AI behavior, check out the &amp;quot;Dragon&amp;quot; scenario from the test scenario or in the AI Modification Demos add-on. &lt;br /&gt;
&lt;br /&gt;
You can configure the Hunter Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;hunter_unit&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI is to be attached.&lt;br /&gt;
* '''home_x,home_y''': The coordinates of the hex to which the hunter returns and rests at after a kill.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the unit's hunting ground.  If this tag is not provided, the hunter uses all of the map.  '''Note: this was called [hunting_ground] in 1.11.2'''&lt;br /&gt;
* '''rest_turns'''=3: (integer)  The number of turns the AI stays at home_x,home_y after a kill.&lt;br /&gt;
* '''show_messages'''=no: (boolean) If set to yes, the hunter announces whenever its behavior changes to the next phase.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a hunter_unit [micro_ai] tag usage from the &amp;quot;Dragon&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=hunter_unit&lt;br /&gt;
             id=Rowck&lt;br /&gt;
             home_x,home_y=3,15&lt;br /&gt;
 &lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=5-30,1-15&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             rest_turns=2&lt;br /&gt;
             show_messages=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Swarm (animal_type=swarm) ===&lt;br /&gt;
&lt;br /&gt;
The Swarm Micro AI uses some very simply algorithms to simulate animal swarm behavior.  Without adjacent enemies, they simply do a random move, trying to stay together and at a certain distance from enemies.  However, if an enemy unit is close to any bat, the swarm scatters.  This is particular fun to watch when one places an enemy unit in the middle of the swarm.  After being scattered, the swarm members slowly rejoin, but not in a very organized way.  Sub-swarms or individual bats might roam around for quite some time before they find their way back.  It is also possible that individual bats (or small groups) split off from the larger swarm at times.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Swarm AI behavior, check out the &amp;quot;Swarm&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Swarm Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be 'swarm'.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''scatter_distance'''=3: (int) Enemies within &amp;quot;scatter_distance&amp;quot; hexes of any swarm unit cause the swarm to scatter, by each unit trying to maximize its individual distance from the enemy.&lt;br /&gt;
* '''enemy_distance'''=5: (int) The minimum distance kept between units of the swarm and enemies when the swarm moves as a whole.&lt;br /&gt;
* '''vision_distance'''=12: (int) Only units within this distance follow the overall swarm motion (either away from an enemy or of the swarm as a whole).  The smaller this value is set, the less likely the swarm is to stay together or rejoin.  This parameter is meant to simulate how far an individual member of the swarm can see, meaning that the swarm is &amp;quot;out of sight&amp;quot; (and the unit will not be able to follow it) if it is more than this distance away.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a Swarm [micro_ai] tag usage from the &amp;quot;Swarm&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=swarm&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Bottleneck Defense Micro AI (ai_type=bottleneck_defense) ==&lt;br /&gt;
&lt;br /&gt;
The Bottleneck Defense Micro AI lets you define a location on the map where the AI can take a defensive stance behind a narrow passage (bottleneck).  Units on the front line are backed up by healers and/or units with the leadership ability.  Injured units are moved to the back and replaced by uninjured (or less injured) units.  The units on the front line only attack when it is safe (no retaliation) or when there is a high chance that they will make a kill or level up.  Using this Micro AI only makes sense if there is no way for the enemy sides to move around the bottleneck and attack the AI's units from behind.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Bottleneck&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Bottleneck Defense Micro AI by putting&lt;br /&gt;
 {MICRO_AI_BOTTLENECK_DEFENSE}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=bottleneck_defense&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Bottleneck Defense specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
The Bottleneck Defense AI requires two sets of coordinates that define where it should be taking up its defensive stance, and from which side the enemy attacks at that location.&lt;br /&gt;
&lt;br /&gt;
* '''x,y''': Comma separated lists of the hexes on the front line, where strong units are placed.  All hexes on which the AI makes contact with (can be attacked by) the enemy need to be included here.  Units are placed on them in the order in which they are listed here.&lt;br /&gt;
* '''enemy_x,enemy_y''': Comma separated list of the hexes from which the enemy can attack the AI front line units.  This is needed for the AI to know on which side of the front line support units (healers etc.) need to be placed.  In many cases, it is sufficient to provide only one of the enemy front line hexes, but there are geometries for which that does not work.  It is therefore safer to list all enemy front line hexes here.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
By default, the AI places healers and units with the leadership ability both on the front line itself (if they are the strongest units available) and on hexes adjacent to and behind the line.  If different placement is desired, these locations can be overridden with the following keys.&lt;br /&gt;
&lt;br /&gt;
* '''healer_x,healer_y''': Comma separated list of hexes where healers are placed.  This can be used to keep healers from the front line (or to take up only certain positions on the front line), and/or to override the default healing positions behind the line.  Healers are placed on them in the order in which the hexes are listed, with the exception that hexes on the line always take priority over hexes behind the line.&lt;br /&gt;
* '''leadership_x,leadership_y''': Same as ''healer_x,healer_y'', but for units with the leadership ability.&lt;br /&gt;
* '''active_side_leader'''=no: (boolean)  If set to 'yes', the side leader participates in the bottleneck defense action after the side's gold has been spent.  If set to 'no' (default), the leader follows default AI behavior (sitting on the keep and recruiting, for the most part).&lt;br /&gt;
&lt;br /&gt;
As an example, in the &amp;quot;Bottleneck&amp;quot; scenario of the test scenario, there are three front line hexes, two of which are on hill terrain, while the third is a road with a lower defense rating.  The healer and side leader are supposed to participate in combat because they are strong units, but only from the hill hexes to keep them safer.  This is accomplished by using the following keys settings (check out the scenario to see which hex is which):&lt;br /&gt;
 [micro_ai]&lt;br /&gt;
     side=1&lt;br /&gt;
     ai_type=bottleneck_defense&lt;br /&gt;
     action=add&lt;br /&gt;
 &lt;br /&gt;
     x=14,14,14&lt;br /&gt;
     y= 7, 9, 8&lt;br /&gt;
     enemy_x=13,13&lt;br /&gt;
     enemy_y= 8, 9&lt;br /&gt;
 &lt;br /&gt;
     healer_x=14,14,15,15&lt;br /&gt;
     healer_y= 7, 9, 8, 9&lt;br /&gt;
     leadership_x=14,14,15,15&lt;br /&gt;
     leadership_y= 7, 9, 9 ,8&lt;br /&gt;
     active_side_leader=yes&lt;br /&gt;
 [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Generalized Goto Micro AI (ai_type=goto) ==&lt;br /&gt;
&lt;br /&gt;
'''*** Note: this Micro AI is available starting from Wesnoth 1.11.3 ***'''&lt;br /&gt;
&lt;br /&gt;
The Goto Micro AI provides a highly configurable method of sending a unit (or units) to a location or set of locations.  The units to be moved are defined using a [[StandardUnitFilter|Standard Unit Filter]] (SUF), while the goto locations are given in a [[StandardLocationFilter|Standard Location Filter]] (SLF).&lt;br /&gt;
&lt;br /&gt;
By default, each unit matching the SUF will move toward the closest goal (in terms of turns needed to get there) matching the SLF via the fastest route given the current situation on the map (locations of enemy units etc.), but this behavior can be influenced by the optional keys listed below.  Note that this means that a unit's goal might change from one turn to the next depending on the situation on the map.&lt;br /&gt;
&lt;br /&gt;
The behavior of the unit(s) once they reach their goal location(s) is configurable as well.  By default, they will stay there until the Goto Micro AI is deleted or changed.&lt;br /&gt;
&lt;br /&gt;
For demonstrations of several Goto Micro AI usages, check out the &amp;quot;Goto&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Goto Micro AI by putting&lt;br /&gt;
 {MICRO_AI_GOTO}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=goto&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Goto specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the units to be moved.&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the possible goal locations for the move.&lt;br /&gt;
&lt;br /&gt;
'''Keys required under certain circumstances:'''&lt;br /&gt;
* '''ca_id''': (string) If several Goto AIs are used for the same side and one or several of these are to be changed or deleted during the scenario, this key needs to be included so that the [micro_ai] tag knows which of them needs to be changed/deleted.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
Note: crossed-out keys have not been implemented yet, will come soon.&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;s&amp;gt;avoid_enemies&amp;lt;/s&amp;gt;'''=0: (non-negative number) By default, units controlled by the Goto Micro AI will not take enemy units into account for route finding, other than the enemies' ZoCs.  The larger the value of ''avoid_enemies'', the more units will try to stay out of the enemies' way.  (I will be more specific here once I have coded this, need to figure out how exactly it will work first).&lt;br /&gt;
* '''ca_score'''=210000: (non-negative integer) The evaluation score of the candidate action controlling this Micro AI.  By default, it is set to 210,000, which is higher than any of the [http://wiki.wesnoth.org/AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29 RCA AI candidate actions].  By setting it, for example, to 90,000, we can have it be executed after the combat CA, but before most of the other CAs which move units.  Maybe more importantly, this key can be used to determine which Goto Micro AI is executed first if several are defined for the same side.&lt;br /&gt;
* '''release_unit_at_goal'''=no: (boolean) By default, a unit that reaches a goal location will stay there until the Goto Micro AI is deleted or changed (or until the conditions specified in the [goto_goals] SLF change).  If this parameter is set, a unit that has reached its goal will not be controlled by this Micro AI any more starting from the next turn.&lt;br /&gt;
* '''release_all_units_at_goal'''=no: (boolean) Same as ''release_unit_at_goal'', but this will deactivate the Goto Micro AI for all units once the first unit reaches a goal.&lt;br /&gt;
* '''unique_goals'''=no: (boolean)  If set to 'yes', each unit will be sent to a different goal location.  Note that the best goals are recalculated each turn, so a unit might choose a different goal this turn from what it was heading for during the previous turn if the situation on the map has changed.  Also note that if there are more units than goal locations, the left over units will not be handled by the Goto MAI but follow default behavior instead.&lt;br /&gt;
* '''use_straight_line'''=no: (boolean)  By default, units choose the route by which they will get to their goal locations in the smallest number of turns.  If this parameter is set to 'yes', a straight line route (or something pretty close to it at least) will be chosen instead, irrespective of whether this leads into a dead end, whether it is blocked by enemies, etc.&lt;br /&gt;
&lt;br /&gt;
===Goto Micro AI example usages:===&lt;br /&gt;
&lt;br /&gt;
Here are several examples of goto [micro_ai] tag usages from the &amp;quot;Goto&amp;quot; test scenario:&lt;br /&gt;
* Send a unit toward a castle (similar to the RCA AI's Goto Candidate Action, but avoiding dead ends and areas ZoCed by enemies)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
             ca_id=messenger1&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 id=messenger1&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=6-7,2-4&lt;br /&gt;
                 terrain=C*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Send all gryphons of the side toward the southern border of the map (not yet included in the scenario)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Gryphon&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 y=33&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Send four bats to the four corners of the map (with each bat going to a different corner)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Vampire Bat&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x=1,1,44,44&lt;br /&gt;
                 y=1,33,1,33&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             unique_goals=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Set up a guardian unit that doesn't move while no enemy unit is within 8 hexes (ironically, the Goto Micro AI can be used to keep units in place, although using one of the Guardian Micro AIs might often be a better idea)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=3&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 id=guard1&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 [filter]&lt;br /&gt;
                     id=guard1&lt;br /&gt;
                 [/filter]&lt;br /&gt;
                 [not]&lt;br /&gt;
                     [filter]&lt;br /&gt;
                         side=1&lt;br /&gt;
                     [/filter]&lt;br /&gt;
                     radius=8&lt;br /&gt;
                 [/not]&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Guardian Micro AI (ai_type=guardian_unit) ==&lt;br /&gt;
The Guardian Micro AI attaches to an individual unit and can be used to set up different kind of guardian behaviors.  Three different types of guardians are available and are described below.&lt;br /&gt;
&lt;br /&gt;
Multiple guardian units can be used on the same side, by setting up a separate [micro_ai] tag for each unit.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of several different guardian behaviors, check out the &amp;quot;Guardians&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Guardians Micro AI by putting&lt;br /&gt;
 {MICRO_AI_GUARDIAN}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=guardian_unit&lt;br /&gt;
in the [micro_ai] tag.  The ''guardian_type='' key also needs to be set, as shown in the following.&lt;br /&gt;
&lt;br /&gt;
=== Return Guardian (guardian_type=return_guardian) ===&lt;br /&gt;
&lt;br /&gt;
A 'return guardian' is a variation of the standard Wesnoth guardian. It has an assigned guard position (GP) to which it returns after attacks on approaching enemies:&lt;br /&gt;
* If at GP with no enemy in reach, do nothing.&lt;br /&gt;
* If at GP with an enemy in reach, attack (note that the attack is done by default AI, which might result in the guardian not attacking if the enemy is deemed too strong).&lt;br /&gt;
* If not at GP, return there, no matter whether an enemy is in reach or not.&lt;br /&gt;
* If enemies are blocking the way back to GP, do your best to move around them.&lt;br /&gt;
* If the guardian ends up next to an enemy on the way back, attack that enemy after the move.&lt;br /&gt;
&lt;br /&gt;
You can configure each return guardian using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be set to &amp;quot;return_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''return_x,return_y''': The coordinate of the hex the unit returns to after each attack&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no optional keys.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a return guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=return_guardian&lt;br /&gt;
             id=return1&lt;br /&gt;
             return_x,return_y=20,2&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
===Stationed Guardian (guardian_type=stationed_guardian) ===&lt;br /&gt;
&lt;br /&gt;
A 'stationed guardian' is another variation of the standard Wesnoth guardian with a somewhat more complex behavior than that of the 'return guardian'. Two positions are defined for it, a 'station' and a 'guarded location', as well as a distance. The behavior is as follows:&lt;br /&gt;
* If no enemy is within 'distance' of the guard's current position, do nothing.  This is independent of the guardian being at its station or not.&lt;br /&gt;
* Otherwise: If an enemy is within 'distance' of the guard, but not also within the same distance of the guarded location and the station (all of this simultaneously), move the guard in the direction of the station.&lt;br /&gt;
* Otherwise:&lt;br /&gt;
** Pick the enemy unit that is closest to the guarded location.&lt;br /&gt;
** If we can reach it, pick the adjacent hex with the highest defense rating and attack from there.&lt;br /&gt;
** If not in reach, move toward this unit.&lt;br /&gt;
&lt;br /&gt;
You can configure each stationed guardian using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;stationed_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''distance''': The distance parameter as explained above&lt;br /&gt;
* '''station_x,station_y''': The x and y position of the hex that serves as the guardians station.&lt;br /&gt;
* '''guard_x, guard_y''': The x and y position of the guarded location.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no optional keys.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a stationed guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=stationed_guardian&lt;br /&gt;
             id=stationed1&lt;br /&gt;
             distance=4&lt;br /&gt;
             station_x,station_y=2,14&lt;br /&gt;
             guard_x,guard_y=3,13&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Coward (guardian_type=coward) ===&lt;br /&gt;
&lt;br /&gt;
Cowards are units that, like guardians, sit around doing nothing until an enemy comes into range.  Unlike guardians, however, they run away once enemies approach. Applications might be wild animals, unarmed civilians getting in the way of a battle, etc.  The coward macro can be called with two optional locations, 'seek' and 'avoid':&lt;br /&gt;
* If neither is given, the coward retreats to the position farthest away from the approaching enemies.&lt;br /&gt;
* If 'seek' is given, it preferentially goes toward that location (but getting away from enemies takes priority).&lt;br /&gt;
* If 'avoid' is given, it in addition tries to avoid that location (with both maximizing distance from enemies and going toward 'seek' taking priority).&lt;br /&gt;
* Both 'seek' and 'avoid' may consist of only one coordinate ('x' or 'y'), in which case not a single hex, but a line of hexes is sought or avoided.&lt;br /&gt;
&lt;br /&gt;
You can configure each coward using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;coward&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''distance''': The distance within which an enemy must be to &amp;quot;scare&amp;quot; the unit&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''seek_x, seek_y''': The x and y coordinate of the hex to seek&lt;br /&gt;
* '''avoid_x, avoid_y''': The x and y coordinate of the hex to avoid&lt;br /&gt;
&lt;br /&gt;
Here's an example of a coward [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=coward&lt;br /&gt;
             id=coward3&lt;br /&gt;
             distance=5&lt;br /&gt;
             seek_x,seek_y=24,5&lt;br /&gt;
             avoid_x,avoid_y=24,15&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Zone guardian (guardian_type=zone_guardian) ===&lt;br /&gt;
&lt;br /&gt;
'''*** Note: this Micro AI is available starting from Wesnoth 1.11.3 ***'''&lt;br /&gt;
&lt;br /&gt;
A zone guardian is a unit that, as the name says, guards a zone. It moves randomly inside this zone until an enemy enters it (or a separately defined enemy zone, see below). Applications might be the defense of a castle or a nesting area.  The zone macro can be called with an optional SLF, [filter_location_enemy]:&lt;br /&gt;
* If not specified, the zone guard attacks any enemy coming inside its guard zone.&lt;br /&gt;
* If [filter_location_enemy] is given, it attacks any enemy entering this zone and once there are no more enemies, it goes back to patrol in its basic zone.&lt;br /&gt;
&lt;br /&gt;
You can configure each zone guardian using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;zone_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''[filter_location]''': A [[StandardUnitFilter|Standard Unit Filter]] designating the zone to guard.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''[filter_location_enemy]''': A [[StandardUnitFilter|Standard Unit Filter]] designating the zone where enemies have to be attacked.  If not given, it defaults to [filter_location].&lt;br /&gt;
&lt;br /&gt;
Here's an example of a zone guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=zone_guardian&lt;br /&gt;
             id=zone3&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=22-31,4-11  # This is intentionally chosen to extend past the lake&lt;br /&gt;
                 terrain=W*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Healer Support Micro AI (ai_type=healer_support) ==&lt;br /&gt;
&lt;br /&gt;
The Healer Support Micro AI configures the healers of a side to stay behind the battle lines and heal injured and/or threatened units rather than participate in combat under all circumstances.  You can set different levels of aggressiveness for the healers.  Note that it is not always better to use this Micro AI than the default AI, as it takes healers (which can be strong units) away from the pool of units to choose for attacks.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Healers&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Healer Support Micro AI by putting&lt;br /&gt;
 {MICRO_AI_HEALER_SUPPORT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=healer_support&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Healer Support specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no required keys.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the healer units.  If set, only units passing this filter ''and'' having the healing ability are considered by this Micro AI.  '''Available from Wesnoth 1.11.3'''&lt;br /&gt;
*'''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting units to receive healing. If set, only units passing this filter ''and'' the other healee selection filters will be selected for healing by this Micro AI.  '''Available from Wesnoth 1.11.3'''&lt;br /&gt;
* '''aggression'''=1.0: (float) Sets the aggressiveness of the AI.  This parameter is set up as a float to accommodate future functionality, but it currently acts as a boolean: if set to zero, the AI will never let its healers participate in combat, for all other values it allows them to attack after all other units have attacked and if the healers cannot find any more units to support.  The former behavior might be appropriate in scenarios with only one or few valuable healers, while the latter might work better in scenarios with many healers.&lt;br /&gt;
* '''injured_units_only'''=no: (boolean) If set to 'yes', the AI will only move healers next to units that are already injured and skip units that currently have full hitpoints, but might get injured during the next enemy turn.&lt;br /&gt;
* '''max_threats'''=9999: (integer) The maximum allowable number of enemies that can attack a hex in order for it to be considered for a healer.  As an example, setting 'max_threats=0' means that the AI only moves healers to locations that are entirely safe from the enemy (assuming that none of the units currently on the map dies).  Note that the value of this key is checked against the number of enemies that can make it to the hex, not the number of adjacent hexes from which the healer could be attacked.&lt;br /&gt;
&lt;br /&gt;
'''Standard RCA AI aspects respected by this Micro AI'''&lt;br /&gt;
*'''[avoid]''': The standard RCA AI aspect used to define terrain that should be avoided by the AI. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Healer Support Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].&lt;br /&gt;
&lt;br /&gt;
This is an example of a Healer Support Micro AI configuration:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=healer_support&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             aggression=0&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Lurkers Micro AI (ai_type=lurkers) ==&lt;br /&gt;
&lt;br /&gt;
The Lurker Micro AI controls some or all units of a side in &amp;quot;lurker mode&amp;quot;.  A lurker is a unit that is capable of moving across most terrains, but that only stops on and attacks from specific terrain.  It might also have the ability to hide on this terrain (which is the reason why it is called a lurker).&lt;br /&gt;
&lt;br /&gt;
Lurkers move individually without strategy and always attack the weakest enemy within their reach.  If no enemy is in reach, the lurker does a random move instead - or it just sits and waits (lurks).&lt;br /&gt;
&lt;br /&gt;
For a demonstration of different types of lurker behavior, check out the &amp;quot;Lurkers&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Lurkers Micro AI by putting&lt;br /&gt;
 {MICRO_AI_LURKERS}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=lurkers&lt;br /&gt;
in the [micro_ai] tag&lt;br /&gt;
&lt;br /&gt;
===Lurkers specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
* '''[filter]''': Specifies which units of the side are controlled by the Lurker Micro AI.  This is a [[StandardUnitFilter|Standard Unit Filter]].  '''Note: this was called [lurkers] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': Specifies the terrain from which the lurkers attack. This is a [[StandardLocationFilter|Standard Location Filter]].  '''Note: this was called [attack_terrain] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''[filter_location_wander]''': Specifies the terrain on which lurkers end their moves if there is no enemy in reach. This is a [[StandardLocationFilter|Standard Location Filter]].  If [filter_location_wander] is not given, it defaults to [filter_location].  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''stationary'''=no: (boolean)  If set to yes, a lurker never moves if there is no enemy within attack range.&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Lurkers&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=4&lt;br /&gt;
             ai_type=lurkers&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Naga Fighter&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=W*,S*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             [filter_location_wander]&lt;br /&gt;
                 terrain=W*&lt;br /&gt;
             [/filter_location_wander]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Messenger Escort Micro AI (ai_type=messenger_escort) ==&lt;br /&gt;
&lt;br /&gt;
The Messenger Escort Micro AI lets you define a set of waypoints through which it tries to move one of its units, the messenger.  The other units escort the messenger, trying to protect it and attacking enemies that are in its way.  Note that the messenger might not strictly hit intermediate waypoints, but that getting close is good enough, especially if a waypoint is occupied by an enemy unit.  It does, however, always try to get to the last waypoint. &lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Messenger&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Messenger Escort Micro AI by putting&lt;br /&gt;
 {MICRO_AI_MESSENGER_ESCORT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=messenger_escort&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Messenger Escort specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''id''': The id of the messenger.  All other units of the side protect the messenger.&lt;br /&gt;
* '''waypoint_x,waypoint_y''': Comma-separated list of waypoint coordinates through which the messenger will go in the given order to reach its goal, given by the last coordinate.  If you want the messenger to go directly to the goal, simply enter a single x,y coordinate here.  Note that the messenger does not have to hit each waypoint exactly (except for the final one), getting close to them is good enough.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''enemy_death_chance'''=0.67 and '''messenger_death_chance'''=0.0: (both floats; ranging from 0 to 1)    If the messenger is adjacent to an enemy at the end of the move, it will only attack the enemy if the chance of death of the enemy is &amp;gt;= enemy_death_chance and if the messenger's chance of death is &amp;lt;= messenger_death_chance (or if it is an attack at a range for which the enemy does not have a weapon).&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Messenger Escort&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=messenger_escort&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             id=messenger&lt;br /&gt;
             waypoint_x=31,24,27,28&lt;br /&gt;
             waypoint_y=20,14,7,1&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Patrol Micro AI (ai_type=patrol_unit) ==&lt;br /&gt;
&lt;br /&gt;
The Patrol Micro AI attaches to an individual unit and defines a number of waypoints for that unit to follow.  Options can be set whether the route should be followed in a loop, as an out-and back, only once, whether units encountered along the way should be attacked, etc.&lt;br /&gt;
&lt;br /&gt;
No matter what options are chosen, getting to the next waypoint always takes priority over attacking for a patroller.  The AI thus prefers to move the patrol unit around enemies rather than straight for them.  Also, if a waypoint is occupied by a unit the AI is not instructed to attack, it will (eventually) abandon that waypoint once it gets close enough and move on to the next one.&lt;br /&gt;
&lt;br /&gt;
Multiple patrol units can be used on the same side, by setting up a separate [micro_ai] tag for each unit.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of several different patrol behaviors, check out the &amp;quot;Patrols&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Patrol Micro AI by putting&lt;br /&gt;
 {MICRO_AI_PATROL}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=patrol_unit&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The [micro_ai] tag needs to be placed after the creation of the unit it controls in the scenario event.'''&lt;br /&gt;
&lt;br /&gt;
===Patrol specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''id''': The id of the patrol unit.&lt;br /&gt;
* '''waypoint_x,waypoint_y''': Comma-separated lists of the waypoint coordinates through which the patrol travels (in order).&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''out_and_back'''=no: (boolean)  By default, a patrol unit returns to the first waypoint after reaching the last, doing the patrol route as a loop.  If this parameter is set to 'yes', the unit instead reverses its course and perpetually does out and backs of the route.&lt;br /&gt;
* '''one_time_only'''=no: (boolean)  If set to 'yes', the unit goes through the patrol route only once and then hangs out at the last waypoint.  It also always attacks any enemy unit on the last waypoint, independent of what ''attack='' is set to.&lt;br /&gt;
* '''attack''': By default (if this key is not set), the patrol unit attacks any unit it ends up next to after a move.  Alternatively, this parameter can be set to a comma-separated list of unit ids. If that is done, the patrol only attacks these units when it ends up next to them and ignores any other unit.  This can in turn be used to have the patroller not attack at all, by setting ''attack='' to a non-existing id.&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Patrols&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=patrol_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             id=Konrad&lt;br /&gt;
             waypoint_x=9,24,25&lt;br /&gt;
             waypoint_y=21,23,15&lt;br /&gt;
             one_time_only=yes&lt;br /&gt;
             attack=Gertburt&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Protect Unit Micro AI (ai_type=protect_unit) ==&lt;br /&gt;
&lt;br /&gt;
The Protect Unit Micro AI tries to move one or several units to a given location while keeping them safe from enem attacks. It does so by keeping the protected units away from enemy units and close to friendly units. Other units on the AI side are controlled by the default Wesnoth AI.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Protect Unit&amp;quot; and &amp;quot;The Elves Besieged&amp;quot; scenarios from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Protect Unit Micro AI by putting&lt;br /&gt;
 {MICRO_AI_PROTECT_UNIT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=protect_unit&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Protect Unit specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[unit]''': A separate [unit] tag is required for each protected unit(s).  Each tag has required keys id=, goal_x=, goal_y= for each unit, as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''disable_move_leader_to_keep'''=no: (boolean) If set to 'yes', side leaders protected by this AI do not try to return to their keep.  This is necessary for this Micro AI to work with units that are side leaders and that are supposed to move to an off-keep location.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Protect Unit Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].  Depending on the parameters, it might also modify the [[AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29|move leader to keep candidate action]].&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;HttT: The Elves Besieged&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             # Required keys of [micro_ai] tag&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=protect_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [unit]&lt;br /&gt;
                 id=Delfador&lt;br /&gt;
                 goal_x,goal_y=1,2&lt;br /&gt;
             [/unit]&lt;br /&gt;
             [unit]&lt;br /&gt;
                 id=Konrad&lt;br /&gt;
                 goal_x,goal_y=1,1&lt;br /&gt;
             [/unit]&lt;br /&gt;
 &lt;br /&gt;
             disable_move_leader_to_keep=true&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Recruiting Micro AI (ai_type=recruiting) ==&lt;br /&gt;
&lt;br /&gt;
The Recruiting Micro AI replaces the default recruitment AI by alternative recruiting patterns.  Currently there are two recruiting algorithms you can choose from, random recruiting and the rush recruiting used in the new (as of Version 1.11.1) Experimental AI (see below).&lt;br /&gt;
&lt;br /&gt;
For a demonstration of a different recruiting pattern, check out the &amp;quot;Recruiting&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.  You can also explore the unit choices by watching the Experimental AI in a multiplayer game.&lt;br /&gt;
&lt;br /&gt;
Enable the Recruiting Micro AI by putting&lt;br /&gt;
 {MICRO_AI_RECRUITING}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=recruiting&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Obviously, the Recruitment Micro AI modifies the [[AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29|recruitment candidate action]].&lt;br /&gt;
&lt;br /&gt;
=== Random Recruitment AI (recruiting_type=random) ===&lt;br /&gt;
&lt;br /&gt;
This AI randomly selects a unit type from the recruitment list of the side.  The probability of choosing each type and the behavior in low-gold situations can be influenced with optional parameters.&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''recruiting_type''': Must be &amp;quot;random&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[probability]''': This tag sets the probability of selecting the given unit type.  It has two required sub-keys:&lt;br /&gt;
** '''type''': comma-separated list of unit types to which this probability is to be applied&lt;br /&gt;
** '''probability''': (non-negative float)  The probability with which these unit types is to be selected.  All unit types for which no [probability] tag is defined receive a default probability of 1.0, thus values should be chosen relative to that.  As an example, in the code below swordsmen and peasants are given a probability of 8, while no other units have assigned probabilities.  Thus, each of these two unit types is 8 times more likely to be selected than any other individual unit type.&lt;br /&gt;
* '''skip_low_gold_recruit'''=no: (boolean)  By default, the random recruitment AI chooses a unit to recruit only from those types for which it has sufficient gold.  If this parameter is set to 'yes', it will instead choose from all available unit types and end recruiting for the turn if there is not enough gold to recruit it this turn (even if other, affordable unit types exist).&lt;br /&gt;
&lt;br /&gt;
Here's an example of a random recruiting [micro_ai] tag usage from the &amp;quot;Recruiting&amp;quot; test scenario: &lt;br /&gt;
&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=recruiting&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             recruiting_type=random&lt;br /&gt;
             [probability]&lt;br /&gt;
                 type=Swordsman,Peasant&lt;br /&gt;
                 probability=8&lt;br /&gt;
             [/probability]&lt;br /&gt;
 &lt;br /&gt;
             skip_low_gold_recruiting=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Rush Recruitment AI (recruiting_type=rushers) ===&lt;br /&gt;
&lt;br /&gt;
This AI replaces the default recruiting with the rush recruiting used in the new (as of Version 1.11.1) Experimental AI.&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''recruiting_type''': Must be &amp;quot;rushers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''randomness'''=0.1: (number)  A random number is applied to the rusher recruit engine's score to prevent the recruitment pattern from being too predictable. 0 causes no randomness to be applied, while larger numbers increase the random effect. A value of 1-2 generates results in which the random effect is approximately equal to the scored effect. Extremely high values are essentially entirely random.&lt;br /&gt;
&lt;br /&gt;
Rush recruiting is set up like this:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=recruiting&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             recruiting_type=rushers&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Other Potential Micro AIs ==&lt;br /&gt;
&lt;br /&gt;
The following Micro AIs might be added at some point.  Feel free to add to this list, if you have other ideas.&lt;br /&gt;
&lt;br /&gt;
* Leader support&lt;br /&gt;
* Targeted enemy poisoning&lt;br /&gt;
* Protect unit/location/area&lt;br /&gt;
* Annoying AI (grab targets and avoid fights as much as possible)&lt;br /&gt;
* Orderly retreat&lt;br /&gt;
&lt;br /&gt;
[[Category:AI]]&lt;/div&gt;</summary>
		<author><name>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51042</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51042"/>
		<updated>2013-05-14T19:38:16Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Have tougher units protect more vulnerable units within the defended area&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be done in 3 stages:&lt;br /&gt;
&lt;br /&gt;
1. Minimize the number of enemy units that can get within attack range of vulnerable units.&lt;br /&gt;
2. Maximize space betwen vulnerable units and enemy units.&lt;br /&gt;
3. Move vulnerable units into a position that allows them maximum utility, provided that it is &amp;quot;safe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Maximize space between vulnerable units and enemy units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51041</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51041"/>
		<updated>2013-05-14T17:53:56Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Minimize the number of enemy units that can get within attack range of vulnerable units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Maximize space between vulnerable units and enemy units&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create a Micro-AI for total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Create goals that are conducive to total defense&amp;lt;/h4&amp;gt;&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h4&amp;gt;Create candidate actions with a very high score given a situation where total defense is necessary&amp;lt;/h4&amp;gt;&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51040</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51040"/>
		<updated>2013-05-14T17:51:08Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. Assuming that the AI wants to actually hold and defend a position against the enemy (as opposed to just running away and minimizing its own losses), the best position would be the one that minimizes enemy presence in the defended area while also minimizing the amount of damage that can be done by the enemy to the AI's own units.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
==Create a Micro-AI for total defense==&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
==Create goals that are conducive to total defense==&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
==Create candidate actions with a very high score given a situation where total defense is necessary==&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51039</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=51039"/>
		<updated>2013-05-14T17:42:35Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
==Create a Micro-AI for total defense==&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
==Create goals that are conducive to total defense==&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
==Create candidate actions with a very high score given a situation where total defense is necessary==&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - (1-aggression)*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50967</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50967"/>
		<updated>2013-05-09T19:14:33Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Create a Micro-AI for total defense */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
==Create a Micro-AI for total defense==&lt;br /&gt;
Create or modify the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
==Create goals that are conducive to total defense==&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
==Create candidate actions with a very high score given a situation where total defense is necessary==&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50966</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50966"/>
		<updated>2013-05-09T18:40:49Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Detailed Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
==Create a Micro-AI for total defense==&lt;br /&gt;
Create the protect unit/location/area, and orderly retreat micro ais listed under potential micro-ais on wiki.wesnoth.org/Micro_AIs#Other_Potential_Micro_AIs&lt;br /&gt;
&lt;br /&gt;
==Create goals that are conducive to total defense==&lt;br /&gt;
Modify protect_my_unit[goal] or protect_unit[goal] so that it does more than just causing units that get within a certain radius of a protected unit to be attacked. Instead make units protect the specified unit in a more general way, like forming lines around it, and limiting enemy movement as much as possible around it.&lt;br /&gt;
	&lt;br /&gt;
==Create candidate actions with a very high score given a situation where total defense is necessary==&lt;br /&gt;
Create candidate actions that place priority on closing off enemy paths and forcing longer paths to vulnerable units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Micro_AIs&amp;diff=50955</id>
		<title>Micro AIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Micro_AIs&amp;diff=50955"/>
		<updated>2013-05-08T02:50:33Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Healer Support specific keys for the [micro_ai] tag: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mirco AIs allow Wesnoth campaign and scenario authors to add new AI functionality without the need for any AI programming.  A Micro AI is activated and configured (or deleted) via the [micro_ai] tag, requiring only a few lines of WML code.  Note that this is a new functionality and theat '''we are very much looking for feedback''' on bugs, new feature requests for the existing AIs or ideas for new Micro AIs.&lt;br /&gt;
&lt;br /&gt;
Micro AIs are available in mainline Wesnoth '''starting from Version 1.11.2'''.  Additional AIs that are still in an experimental stage are available in the ''AI Modification Demos'' add-on, which also might contain more advanced (development) versions of the mainline Micro AIs.&lt;br /&gt;
&lt;br /&gt;
== A Few General Words about Micro AIs ==&lt;br /&gt;
&lt;br /&gt;
* Micro AIs are meant to bring new specialized behavior to Wesnoth that cannot be achieved, at least not easily, by adjusting default AI parameters (such as those described at [[AiWML]]) or with WML code.&lt;br /&gt;
&lt;br /&gt;
* Most Micro AIs in their default setting apply to all units of a side, although many of them provide parameters for filtering the units that should be affected by the new behavior.  If the Micro AI is applied only to part of the units of a side, the other units follow the default Wesnoth AI behavior.&lt;br /&gt;
&lt;br /&gt;
* By contrast, a few Micro AIs attach directly to a unit and only affect that unit's behavior.  These are so-called [[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|Behavior Candidate Actions]] (BCAs).  This type of Micro AI has an [[Micro_AIs#2._Activating_and_configuring_.28or_deleting.29_a_Micro_AI|ai_type=]] value ending in ''_unit'', in order to distinguish it from the side-wide Micro AIs.&lt;br /&gt;
&lt;br /&gt;
=== Micro AI Test and Demo Scenarios ===&lt;br /&gt;
&lt;br /&gt;
All Micro AIs described here can be checked out in a number of test and demo scenarios.  Test scenarios can be accessed from the command line by typing&lt;br /&gt;
 path/wesnoth-executable -t micro_ai_test&lt;br /&gt;
This starts up a &amp;quot;switchboard scenario&amp;quot; in which you can select the Micro AI demonstration scenario you want to check out.  Here, ''path/wesnoth-executable'' needs to be replaced by whatever the path and filename of the Wesnoth executable is on your system.&lt;br /&gt;
&lt;br /&gt;
Another way to test the Micro AIs (as well as some other AIs still under development) is to download the ''AI Modification Demos'' add-on.  All the test/demo scenarios are also available there.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Micro AI ==&lt;br /&gt;
&lt;br /&gt;
Setting up a Micro AI is done in two simple steps:&lt;br /&gt;
&lt;br /&gt;
==== 1. Enabling the Micro AI functionality in the [side] tag ====&lt;br /&gt;
&lt;br /&gt;
The desired AI functionality needs to be enabled for a side before it can be used.  This is done by including a single macro line inside the [side] tag, such as:&lt;br /&gt;
     {MICRO_AI_HEALER_SUPPORT}&lt;br /&gt;
The exact macro name depends on the specific Micro AI and is given below for each AI.  This macro must be put '''directly into the [side] tag''', it does not go inside an [ai] tag.  This step does not yet activate the Micro AI, it simply sets up the desired functionality.&lt;br /&gt;
&lt;br /&gt;
==== 2. Activating and configuring (or deleting) a Micro AI ====&lt;br /&gt;
&lt;br /&gt;
Micro AIs are activated, deleted and configured using the [micro_ai] tag.  This tag needs to be placed in [[ActionWML]], that is, in an event, a menu option or the like.  As an example, the following code activates the healer_support Micro AI in its default configuration for Side 2 from the beginning of the scenario:&lt;br /&gt;
     [event]&lt;br /&gt;
         name=prestart&lt;br /&gt;
 &lt;br /&gt;
         # Configure the healer support micro AI&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=healer_support&lt;br /&gt;
             action=add&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
     [/event]&lt;br /&gt;
All [micro_ai] tags must contain the following three (or four) required keys:&lt;br /&gt;
* '''side''': The side for which the Micro AI is to be added, changed or deleted&lt;br /&gt;
* '''ai_type''': The type of Micro AI to be added, changed or deleted.  See the following sections for allowed values.&lt;br /&gt;
* '''action''' (string): The action to take concerning the Micro AI.  The following values are allowed: &lt;br /&gt;
** ''add'': Add a Micro AI to a side.&lt;br /&gt;
** ''change'': Change the configuration of an existing Micro AI.  Note that this does not only change the specific parameters provided in the tag, but it replaces the entire existing Micro AI by a new version with the new (and only the new) configuration.  It is therefore equivalent to using first the ''delete'' and then the ''add'' action.&lt;br /&gt;
** ''delete'': Delete an existing Micro AI from a side.&lt;br /&gt;
* '''id''': If the Micro AI attaches directly to a unit, rather than being side-wide, the id of the unit is also a required parameter.&lt;br /&gt;
&lt;br /&gt;
Other keys may also be required depending on the Micro AI.  In additional, a number of optional keys may be available to configure the AI behavior.  See the following sections on the individual Micro AIs for details.&lt;br /&gt;
&lt;br /&gt;
'''Notes:''' &lt;br /&gt;
* The ''add'' and ''change'' actions ignore all keys that do not apply to the respective Micro AI type.  The ''delete'' action ignores all keys other than the three (or four) required keys listed here.&lt;br /&gt;
&lt;br /&gt;
* Some of the Micro AIs use and/or modify default AI components (candidate actions or aspects) when they are added, or reset these components to their default values when they are deleted.  Thus, if you have modified the AI yourself using the default CAs or aspects, some of these modifications might be affected, or might be interfering with the Micro AI.  The sections below indicate whether a Micro AI modifies any default AI components.&lt;br /&gt;
&lt;br /&gt;
* It is currently not possible to combine different Micro AI types (AIs using different values of ai_type=) on the same side.  In other words, you can use several guardians (and even different guardian types) on the same side (as they are all handled by the Guardian Micro AI), but it is not possible to put, for example, guardians and patrollers on the same side.  This restriction will be lifted in an upcoming release.  In the meantime, you will have to use different (allied) sides to accomplish this.&lt;br /&gt;
&lt;br /&gt;
== Animals Micro AI (ai_type=animals) ==&lt;br /&gt;
&lt;br /&gt;
The Animals Micro AIs are meant to simulate the behaviors of certain types of animals.  They are, however, set up so that they can be used with arbitrary unit types and might be applicable in quite diverse situations.  The AIs nevertheless remain named after the animals for which they were written originally, so that they are (to some extent) descriptive of their behavior.&lt;br /&gt;
&lt;br /&gt;
Brief descriptions of the AI behaviors are given in the following subsections.  To get a better feeling for their behavior, check out the &amp;quot;Animals&amp;quot;, &amp;quot;Swarm&amp;quot;, &amp;quot;Wolves&amp;quot; and &amp;quot;Dragon&amp;quot; scenarios from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.  Note that some of the animal AIs are designed for animal types that do not exist in mainline.  In the test scenario, other animal types are therefore substituted for them.  If you want to see them with the animal types for which they were written, check out the ''AI Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable an Animals Micro AI by putting&lt;br /&gt;
 {MICRO_AI_ANIMALS}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=animals&lt;br /&gt;
in the [micro_ai] tag. The ''animal_type='' tag is then used to select the desired animal AI.&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Wolves (animal_type=wolves) ===&lt;br /&gt;
&lt;br /&gt;
The Wolves Micro AI organizes all &amp;quot;wolf&amp;quot; units (predators) of the side to hunt in a single pack.  They actively chase after the closest prey and try to corner it (not always super successfully), but are easily distracted by other prey coming into range, to the point where the pack splits up.  The wolves can also be told to try to avoid other types of units (such as larger predators), except when they are going in for an attack.  When no prey is left, the wolves wander randomly.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Wolves AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Note that another wolves AI exists, called [[Micro_AIs#Animals_AI:_Multi-pack_Wolves_.28animal_type.3Dwolves_multipacks.29|Multipack Wolves]], which distributes the wolves of a side into several packs, rather than all of them into one single pack as it is done here.&lt;br /&gt;
&lt;br /&gt;
You can configure the Wolves Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;wolves&amp;quot;.&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the predator units.  '''Note: this was called [predators] in 1.11.2'''&lt;br /&gt;
* '''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the prey units.  '''Note: this was called [prey] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''avoid_type''': Comma-separated list of unit types which the wolves try to avoid&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Wolves Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].&lt;br /&gt;
&lt;br /&gt;
Here's an example of a wolves [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=6&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=wolves&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Wolf&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_second]&lt;br /&gt;
                 type=Deer&lt;br /&gt;
             [/filter_second]&lt;br /&gt;
             avoid_type=Yeti,Giant Spider,Tarantula,Bear,Dog&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Multi-pack Wolves (animal_type=wolves_multipacks) ===&lt;br /&gt;
&lt;br /&gt;
The Multi-pack Wolves Micro AI is different from the [[Micro_AIs#Animals_AI:_Wolves_.28animal_type.3Dwolves.29|Wolves Micro AI]] in that there can be an arbitrary number of wolf packs, with the pack size being a free parameter.  At the beginning of the scenario, close wolves are grouped into packs in a semi-methodical way.  If the wolves are put on the map in distinct groups of close wolves of the correct number, they will be joined into packs matching these groups.  If, on the other hand, they are spread out all over the map, the method of assigning them to packs is semi-random.&lt;br /&gt;
&lt;br /&gt;
Wolves of the same pack begin by joining each other on the map.  After that, they stay together until only one wolf is left, which then tries to join up with an incomplete pack or with other single wolves.  Individual wolves entering the map during the scenario behave in that way as well.&lt;br /&gt;
&lt;br /&gt;
A second difference to the other Wolves AI is that wolves do not actively hunt here.  For the most part they just wander (often long distance).  However, the pack ferociously (and without regard for its own health) attacks any enemy units that come into range, as long as that does not mean separating the pack by more than a few hexes.  Staying together, or joining with a new wolf assigned to the pack, is the only thing that takes priority over satisfying the wolves' thirst for blood.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Multi-pack Wolves AI behavior, check out the &amp;quot;Wolves&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Multi-pack Wolves Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;wolves_multipacks&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''type'''=Wolf: Comma-separated list of the unit types which the AI controls. The default value is &amp;quot;Wolf&amp;quot;.&lt;br /&gt;
* '''pack_size'''=3: (integer) The size of the packs.&lt;br /&gt;
* '''show_pack_number'''=no: If set to &amp;quot;yes&amp;quot;, the wolves' pack numbers will be shown below them.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a wolves_multipacks [micro_ai] tag usage from the &amp;quot;Wolves&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=wolves_multipacks&lt;br /&gt;
             show_pack_number=yes&lt;br /&gt;
             pack_size=4&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Big Animals (animal_type=big_animals) ===&lt;br /&gt;
&lt;br /&gt;
The Big Animals Micro AI is a simulation of large predators that wander and hunt alone, such as Bears, Giant Spiders or Yetis.  For the most part, these just wander on the terrain that's been defined for them, but they attack enemy units if those happen to come into range.  The AI can be set up so that the Big Animals stay out of the way of other units (such as other large predators), in which case they only attack those if cornered.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Big Animals AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Big Animals Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;big_animals&amp;quot;&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the animals to which this AI is applied.  '''Note: this was called [big_animals] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': The big animals often go for long distance (multi-turn) journeys.  This tag is a [[StandardLocationFilter|Standard Location Filter]] describing the terrain from which the next goal is chosen.  The default is all terrain on the map.  '''Note: this was called [goal_terrain] in 1.11.2'''&lt;br /&gt;
* '''[filter_location_wander]''': The terrain on which the big animals will end their moves. This is a [[StandardLocationFilter|Standard Location Filter]].  The default is all terrain on the map.  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''[avoid_unit]''': A [[StandardUnitFilter|Standard Unit Filter]] describing all enemy units that the big animals will avoid.  Note that the condition that this must be enemy units is added by the AI automatically and does not need to be included in the filter.&lt;br /&gt;
&lt;br /&gt;
Here's an example of big_animals [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=3&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=big_animals&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Bear&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [avoid_unit]&lt;br /&gt;
                 type=Yeti,Giant Spider,Tarantula,Bear,Dog&lt;br /&gt;
             [/avoid_unit]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=1-40,1-18&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             [filter_location_wander]&lt;br /&gt;
                 terrain=*&lt;br /&gt;
             [/filter_location_wander]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Forest Animals (animal_type=forest_animals) ===&lt;br /&gt;
&lt;br /&gt;
The Forest Animals Micro AI simulates a number of different animal behaviors that one might find in a forest, namely animals behaving like deer, rabbits and families of tuskers.  In the following, we will refer to those animals by these types, even though the actual unit types can be selected freely.  They behave as follows:&lt;br /&gt;
* Each deer wanders randomly on (selectable) terrain, except when enemies get in its (the deer's) maximum movement range, in which case it flees to the farthest point it can reach.&lt;br /&gt;
* Tuskers exhibit the same behavior as deer, except when an enemy is next to one of the tusklets.  This enemy is attacked unconditionally by the tuskers trying to protect their young.&lt;br /&gt;
* Tusklets blindly follow the closest adult tusker, except when there is no tusker left, in which case they behave the same as deer.&lt;br /&gt;
* Rabbits also wander randomly, but in addition disappear into their holes (if any are within reach) when enemies are close.  They reappear out of their holes at the beginning of the turn, if it is safe.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Forest Animals AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the test scenario or in the AI Modification Demos add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Forest Animals Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;forest_animals&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''rabbit_type, tusker_type, tusklet_type, deer_type''': Comma-separated lists of the unit types behaving as the respective animals.  If any of these parameters are not set, those types of animal behavior are skipped by the AI.&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the terrain on which the forest animals wander when they are not threatened by enemies.  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''rabbit_number'''=6: (integer)  The number of rabbits for the AI to have on the map simultaneously.  The AI puts the missing number of rabbits onto the map at the beginning of the AI's turn (when the rabbits come out of their holes).&lt;br /&gt;
* '''rabbit_enemy_distance'''=3: (number)  Rabbits won't spawn in holes that aren't more than this distance away from all enemies.&lt;br /&gt;
* '''rabbit_hole_img''': Rabbit holes are marked by items on the map.  If this parameter is set, it must be the file name of the item image.  If it is not set, all items on the map are treated as rabbit holes.&lt;br /&gt;
&lt;br /&gt;
Here's an example of forest_animals [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=forest_animals&lt;br /&gt;
             deer_type=Deer&lt;br /&gt;
             rabbit_type=Rabbit&lt;br /&gt;
             tusker_type=Tusker&lt;br /&gt;
             tusklet_type=Tusklet&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=*^F*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Herd and Herders (animal_type=herding) ===&lt;br /&gt;
&lt;br /&gt;
The Herding Micro AI sets up an area on the map where a number of herder units (such as sheep dog) control and protect a herd (such as sheep).  For convenience, we simply refer to them as sheep dogs and sheep in the following, even though arbitrary unit types can be selected for either.&lt;br /&gt;
&lt;br /&gt;
Sheep dogs try to keep their sheep safe.  This involves keeping them inside the herding area, positioning themselves in between the sheep and approaching enemies, and attacking the enemies if those get too close.  If no active herding or protecting move is needed, the dogs go to a random location on the perimeter of the herding area.&lt;br /&gt;
&lt;br /&gt;
Sheep wander aimlessly except when a sheep dog is next to them, in which case they run away from the dog.  The dogs exploit this by positioning themselves on the outside of the sheep, if possible.  Sheep also run away from approaching enemies.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Herding AI behavior, check out the &amp;quot;Animals&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Herding Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;herding&amp;quot;&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] describing the herder units (e.g. dogs).  '''Note: this was called [herders] in 1.11.2'''&lt;br /&gt;
* '''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] describing the herd units (e.g. sheep).  '''Note: this was called [herd] in 1.11.2'''&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the terrain forming the perimeter of the herding area.  In other words, this is the path the herders (dogs) use to patrol around the outside of the herding area.  This must be a set of coordinates ''completely enclosing'' the herding area.  '''Note: this was called [herding_perimeter] in 1.11.2'''.  Here's an example of setting up a rectangular perimeter:&lt;br /&gt;
     [filter_location]&lt;br /&gt;
         x=10-20,10-20,10,  ,20&lt;br /&gt;
         y=11,   21,   11-21,11-21&lt;br /&gt;
     [/filter_location]&lt;br /&gt;
Another possibility is by defining the path by certain terrain on the map (as it is done in the &amp;quot;Animals&amp;quot; test scenario), in which case the filter can simply look like this:&lt;br /&gt;
     [filter_location]&lt;br /&gt;
         terrain=Rb&lt;br /&gt;
     [/filter_location]&lt;br /&gt;
* '''herd_x,herd_y''': The coordinate of one hex (''any'' one hex) inside the herding area.  This is needed to define which part of the map is on the ''inside'' of the herding area perimeter defined by [herding_perimeter], and which is the ''outside''.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''attention_distance'''=8: (integer)  If an enemy is within this distance of a herd unit, but not as close as ''attack_distance'', the herders try to position themselves in between the enemy and the herd unit.&lt;br /&gt;
* '''attack_distance'''=4: (integer)  If an enemy is within this distance of a herd animal, the herders attack this enemy.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a Herding [micro_ai] tag usage from the &amp;quot;Animals&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=herding&lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Dog&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_second]&lt;br /&gt;
                 type=Sheep,Ram&lt;br /&gt;
             [/filter_second]&lt;br /&gt;
             herd_x,herd_y=32,28&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=Rb&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Hunter (animal_type=hunter_unit) ===&lt;br /&gt;
&lt;br /&gt;
The Hunter Micro AI attaches to an individual unit which it leads through hunt-and-rest cycles.  The unit wanders in a prescribed area of the map, its hunting ground, until an enemy unit comes within range.  Note that it does not actively chase down enemies, but wanders randomly through its hunting ground until an enemy is encountered.&lt;br /&gt;
&lt;br /&gt;
If enemies are within range, the hunter attacks the weakest of them.  If a kill is made, it then retreats to its rest location, where it stays for a certain number of turns or until fully healed.&lt;br /&gt;
&lt;br /&gt;
A few more details:&lt;br /&gt;
* If the hunter's way home is entirely blocked on the return (so that there is no possible path), the normal RCA AI takes over its behavior.&lt;br /&gt;
* However, if the way is blocked by an enemy unit occupying the rest hex, that enemy will be attacked unconditionally.&lt;br /&gt;
* A kill only makes the hunter go home when it is the attacker, not as defender.&lt;br /&gt;
&lt;br /&gt;
Multiple hunter units can be used on the same side, by setting up a separate [micro_ai] tag for each unit. &lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Hunter AI behavior, check out the &amp;quot;Dragon&amp;quot; scenario from the test scenario or in the AI Modification Demos add-on. &lt;br /&gt;
&lt;br /&gt;
You can configure the Hunter Micro AI by using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be &amp;quot;hunter_unit&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI is to be attached.&lt;br /&gt;
* '''home_x,home_y''': The coordinates of the hex to which the hunter returns and rests at after a kill.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the unit's hunting ground.  If this tag is not provided, the hunter uses all of the map.  '''Note: this was called [hunting_ground] in 1.11.2'''&lt;br /&gt;
* '''rest_turns'''=3: (integer)  The number of turns the AI stays at home_x,home_y after a kill.&lt;br /&gt;
* '''show_messages'''=no: (boolean) If set to yes, the hunter announces whenever its behavior changes to the next phase.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a hunter_unit [micro_ai] tag usage from the &amp;quot;Dragon&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=hunter_unit&lt;br /&gt;
             id=Rowck&lt;br /&gt;
             home_x,home_y=3,15&lt;br /&gt;
 &lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=5-30,1-15&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             rest_turns=2&lt;br /&gt;
             show_messages=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Animals AI: Swarm (animal_type=swarm) ===&lt;br /&gt;
&lt;br /&gt;
The Swarm Micro AI uses some very simply algorithms to simulate animal swarm behavior.  Without adjacent enemies, they simply do a random move, trying to stay together and at a certain distance from enemies.  However, if an enemy unit is close to any bat, the swarm scatters.  This is particular fun to watch when one places an enemy unit in the middle of the swarm.  After being scattered, the swarm members slowly rejoin, but not in a very organized way.  Sub-swarms or individual bats might roam around for quite some time before they find their way back.  It is also possible that individual bats (or small groups) split off from the larger swarm at times.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of the Swarm AI behavior, check out the &amp;quot;Swarm&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
You can configure the Swarm Micro AI by using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''animal_type''': Must be 'swarm'.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''scatter_distance'''=3: (int) Enemies within &amp;quot;scatter_distance&amp;quot; hexes of any swarm unit cause the swarm to scatter, by each unit trying to maximize its individual distance from the enemy.&lt;br /&gt;
* '''enemy_distance'''=5: (int) The minimum distance kept between units of the swarm and enemies when the swarm moves as a whole.&lt;br /&gt;
* '''vision_distance'''=12: (int) Only units within this distance follow the overall swarm motion (either away from an enemy or of the swarm as a whole).  The smaller this value is set, the less likely the swarm is to stay together or rejoin.  This parameter is meant to simulate how far an individual member of the swarm can see, meaning that the swarm is &amp;quot;out of sight&amp;quot; (and the unit will not be able to follow it) if it is more than this distance away.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a Swarm [micro_ai] tag usage from the &amp;quot;Swarm&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=animals&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             animal_type=swarm&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Bottleneck Defense Micro AI (ai_type=bottleneck_defense) ==&lt;br /&gt;
&lt;br /&gt;
The Bottleneck Defense Micro AI lets you define a location on the map where the AI can take a defensive stance behind a narrow passage (bottleneck).  Units on the front line are backed up by healers and/or units with the leadership ability.  Injured units are moved to the back and replaced by uninjured (or less injured) units.  The units on the front line only attack when it is safe (no retaliation) or when there is a high chance that they will make a kill or level up.  Using this Micro AI only makes sense if there is no way for the enemy sides to move around the bottleneck and attack the AI's units from behind.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Bottleneck&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Bottleneck Defense Micro AI by putting&lt;br /&gt;
 {MICRO_AI_BOTTLENECK_DEFENSE}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=bottleneck_defense&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Bottleneck Defense specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
The Bottleneck Defense AI requires two sets of coordinates that define where it should be taking up its defensive stance, and from which side the enemy attacks at that location.&lt;br /&gt;
&lt;br /&gt;
* '''x,y''': Comma separated lists of the hexes on the front line, where strong units are placed.  All hexes on which the AI makes contact with (can be attacked by) the enemy need to be included here.  Units are placed on them in the order in which they are listed here.&lt;br /&gt;
* '''enemy_x,enemy_y''': Comma separated list of the hexes from which the enemy can attack the AI front line units.  This is needed for the AI to know on which side of the front line support units (healers etc.) need to be placed.  In many cases, it is sufficient to provide only one of the enemy front line hexes, but there are geometries for which that does not work.  It is therefore safer to list all enemy front line hexes here.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
By default, the AI places healers and units with the leadership ability both on the front line itself (if they are the strongest units available) and on hexes adjacent to and behind the line.  If different placement is desired, these locations can be overridden with the following keys.&lt;br /&gt;
&lt;br /&gt;
* '''healer_x,healer_y''': Comma separated list of hexes where healers are placed.  This can be used to keep healers from the front line (or to take up only certain positions on the front line), and/or to override the default healing positions behind the line.  Healers are placed on them in the order in which the hexes are listed, with the exception that hexes on the line always take priority over hexes behind the line.&lt;br /&gt;
* '''leadership_x,leadership_y''': Same as ''healer_x,healer_y'', but for units with the leadership ability.&lt;br /&gt;
* '''active_side_leader'''=no: (boolean)  If set to 'yes', the side leader participates in the bottleneck defense action after the side's gold has been spent.  If set to 'no' (default), the leader follows default AI behavior (sitting on the keep and recruiting, for the most part).&lt;br /&gt;
&lt;br /&gt;
As an example, in the &amp;quot;Bottleneck&amp;quot; scenario of the test scenario, there are three front line hexes, two of which are on hill terrain, while the third is a road with a lower defense rating.  The healer and side leader are supposed to participate in combat because they are strong units, but only from the hill hexes to keep them safer.  This is accomplished by using the following keys settings (check out the scenario to see which hex is which):&lt;br /&gt;
 [micro_ai]&lt;br /&gt;
     side=1&lt;br /&gt;
     ai_type=bottleneck_defense&lt;br /&gt;
     action=add&lt;br /&gt;
 &lt;br /&gt;
     x=14,14,14&lt;br /&gt;
     y= 7, 9, 8&lt;br /&gt;
     enemy_x=13,13&lt;br /&gt;
     enemy_y= 8, 9&lt;br /&gt;
 &lt;br /&gt;
     healer_x=14,14,15,15&lt;br /&gt;
     healer_y= 7, 9, 8, 9&lt;br /&gt;
     leadership_x=14,14,15,15&lt;br /&gt;
     leadership_y= 7, 9, 9 ,8&lt;br /&gt;
     active_side_leader=yes&lt;br /&gt;
 [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Generalized Goto Micro AI (ai_type=goto) ==&lt;br /&gt;
&lt;br /&gt;
==== *** Note: this Micro AI will be available starting with Wesnoth 1.11.3 *** ====&lt;br /&gt;
&lt;br /&gt;
The Goto Micro AI provides a highly configurable method of sending a unit (or units) to a location or set of locations.  The units to be moved are defined using a [[StandardUnitFilter|Standard Unit Filter]] (SUF), while the goto locations are given in a [[StandardLocationFilter|Standard Location Filter]] (SLF).&lt;br /&gt;
&lt;br /&gt;
By default, each unit matching the SUF will move toward the closest goal (in terms of turns needed to get there) matching the SLF via the fastest route given the current situation on the map (locations of enemy units etc.), but this behavior can be influenced by the optional keys listed below.  Note that this means that a unit's goal might change from one turn to the next depending on the situation on the map.&lt;br /&gt;
&lt;br /&gt;
The behavior of the unit(s) once they reach their goal location(s) is configurable as well.  By default, they will stay there until the Goto Micro AI is deleted or changed.&lt;br /&gt;
&lt;br /&gt;
For demonstrations of several Goto Micro AI usages, check out the &amp;quot;Goto&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Goto Micro AI by putting&lt;br /&gt;
 {MICRO_AI_GOTO}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=goto&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Goto specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the units to be moved.&lt;br /&gt;
* '''[filter_location]''': A [[StandardLocationFilter|Standard Location Filter]] describing the possible goal locations for the move.&lt;br /&gt;
&lt;br /&gt;
'''Keys required under certain circumstances:'''&lt;br /&gt;
* '''ca_id''': (string) If several Goto AIs are used for the same side and one or several of these are to be changed or deleted during the scenario, this key needs to be included so that the [micro_ai] tag knows which of them needs to be changed/deleted.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
Note: crossed-out keys have not been implemented yet, will come soon.&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;s&amp;gt;avoid_enemies&amp;lt;/s&amp;gt;'''=0: (non-negative number) By default, units controlled by the Goto Micro AI will not take enemy units into account for route finding, other than the enemies' ZoCs.  The larger the value of ''avoid_enemies'', the more units will try to stay out of the enemies' way.  (I will be more specific here once I have coded this, need to figure out how exactly it will work first).&lt;br /&gt;
* '''ca_score'''=210000: (non-negative integer) The evaluation score of the candidate action controlling this Micro AI.  By default, it is set to 210,000, which is higher than any of the [http://wiki.wesnoth.org/AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29 RCA AI candidate actions].  By setting it, for example, to 90,000, we can have it be executed after the combat CA, but before most of the other CAs which move units.  Maybe more importantly, this key can be used to determine which Goto Micro AI is executed first if several are defined for the same side.&lt;br /&gt;
* '''release_unit_at_goal'''=no: (boolean) By default, a unit that reaches a goal location will stay there until the Goto Micro AI is deleted or changed (or until the conditions specified in the [goto_goals] SLF change).  If this parameter is set, a unit that has reached its goal will not be controlled by this Micro AI any more starting from the next turn.&lt;br /&gt;
* '''release_all_units_at_goal'''=no: (boolean) Same as ''release_unit_at_goal'', but this will deactivate the Goto Micro AI for all units once the first unit reaches a goal.&lt;br /&gt;
* '''unique_goals'''=no: (boolean)  If set to 'yes', each unit will be sent to a different goal location.  Note that the best goals are recalculated each turn, so a unit might choose a different goal this turn from what it was heading for during the previous turn if the situation on the map has changed.  Also note that if there are more units than goal locations, the left over units will not be handled by the Goto MAI but follow default behavior instead.&lt;br /&gt;
* '''use_straight_line'''=no: (boolean)  By default, units choose the route by which they will get to their goal locations in the smallest number of turns.  If this parameter is set to 'yes', a straight line route (or something pretty close to it at least) will be chosen instead, irrespective of whether this leads into a dead end, whether it is blocked by enemies, etc.&lt;br /&gt;
&lt;br /&gt;
===Goto Micro AI example usages:===&lt;br /&gt;
&lt;br /&gt;
Here are several examples of goto [micro_ai] tag usages from the &amp;quot;Goto&amp;quot; test scenario:&lt;br /&gt;
* Send a unit toward a castle (similar to the RCA AI's Goto Candidate Action, but avoiding dead ends and areas ZoCed by enemies)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
             ca_id=messenger1&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 id=messenger1&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=6-7,2-4&lt;br /&gt;
                 terrain=C*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Send all gryphons of the side toward the southern border of the map (not yet included in the scenario)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Gryphon&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 y=33&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Send four bats to the four corners of the map (with each bat going to a different corner)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=7&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Vampire Bat&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x=1,1,44,44&lt;br /&gt;
                 y=1,33,1,33&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             unique_goals=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
* Set up a guardian unit that doesn't move while no enemy unit is within 8 hexes (ironically, the Goto Micro AI can be used to keep units in place, although using one of the Guardian Micro AIs might often be a better idea)&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=3&lt;br /&gt;
             ai_type=goto&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 id=guard1&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 [filter]&lt;br /&gt;
                     id=guard1&lt;br /&gt;
                 [/filter]&lt;br /&gt;
                 [not]&lt;br /&gt;
                     [filter]&lt;br /&gt;
                         side=1&lt;br /&gt;
                     [/filter]&lt;br /&gt;
                     radius=8&lt;br /&gt;
                 [/not]&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Guardian Micro AI (ai_type=guardian_unit) ==&lt;br /&gt;
The Guardian Micro AI attaches to an individual unit and can be used to set up different kind of guardian behaviors.  Three different types of guardians are available and are described below.&lt;br /&gt;
&lt;br /&gt;
Multiple guardian units can be used on the same side, by setting up a separate [micro_ai] tag for each unit.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of several different guardian behaviors, check out the &amp;quot;Guardians&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Guardians Micro AI by putting&lt;br /&gt;
 {MICRO_AI_GUARDIAN}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=guardian_unit&lt;br /&gt;
in the [micro_ai] tag.  The ''guardian_type='' key also needs to be set, as shown in the following.&lt;br /&gt;
&lt;br /&gt;
=== Return Guardian (guardian_type=return_guardian) ===&lt;br /&gt;
&lt;br /&gt;
A 'return guardian' is a variation of the standard Wesnoth guardian. It has an assigned guard position (GP) to which it returns after attacks on approaching enemies:&lt;br /&gt;
* If at GP with no enemy in reach, do nothing.&lt;br /&gt;
* If at GP with an enemy in reach, attack (note that the attack is done by default AI, which might result in the guardian not attacking if the enemy is deemed too strong).&lt;br /&gt;
* If not at GP, return there, no matter whether an enemy is in reach or not.&lt;br /&gt;
* If enemies are blocking the way back to GP, do your best to move around them.&lt;br /&gt;
* If the guardian ends up next to an enemy on the way back, attack that enemy after the move.&lt;br /&gt;
&lt;br /&gt;
You can configure each return guardian using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be set to &amp;quot;return_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''return_x,return_y''': The coordinate of the hex the unit returns to after each attack&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no optional keys.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a return guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=return_guardian&lt;br /&gt;
             id=return1&lt;br /&gt;
             return_x,return_y=20,2&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
===Stationed Guardian (guardian_type=stationed_guardian) ===&lt;br /&gt;
&lt;br /&gt;
A 'stationed guardian' is another variation of the standard Wesnoth guardian with a somewhat more complex behavior than that of the 'return guardian'. Two positions are defined for it, a 'station' and a 'guarded location', as well as a distance. The behavior is as follows:&lt;br /&gt;
* If no enemy is within 'distance' of the guard's current position, do nothing.  This is independent of the guardian being at its station or not.&lt;br /&gt;
* Otherwise: If an enemy is within 'distance' of the guard, but not also within the same distance of the guarded location and the station (all of this simultaneously), move the guard in the direction of the station.&lt;br /&gt;
* Otherwise:&lt;br /&gt;
** Pick the enemy unit that is closest to the guarded location.&lt;br /&gt;
** If we can reach it, pick the adjacent hex with the highest defense rating and attack from there.&lt;br /&gt;
** If not in reach, move toward this unit.&lt;br /&gt;
&lt;br /&gt;
You can configure each stationed guardian using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;stationed_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''distance''': The distance parameter as explained above&lt;br /&gt;
* '''station_x,station_y''': The x and y position of the hex that serves as the guardians station.&lt;br /&gt;
* '''guard_x, guard_y''': The x and y position of the guarded location.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no optional keys.&lt;br /&gt;
&lt;br /&gt;
Here's an example of a stationed guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=stationed_guardian&lt;br /&gt;
             id=stationed1&lt;br /&gt;
             distance=4&lt;br /&gt;
             station_x,station_y=2,14&lt;br /&gt;
             guard_x,guard_y=3,13&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Coward (guardian_type=coward) ===&lt;br /&gt;
&lt;br /&gt;
Cowards are units that, like guardians, sit around doing nothing until an enemy comes into range.  Unlike guardians, however, they run away once enemies approach. Applications might be wild animals, unarmed civilians getting in the way of a battle, etc.  The coward macro can be called with two optional locations, 'seek' and 'avoid':&lt;br /&gt;
* If neither is given, the coward retreats to the position farthest away from the approaching enemies.&lt;br /&gt;
* If 'seek' is given, it preferentially goes toward that location (but getting away from enemies takes priority).&lt;br /&gt;
* If 'avoid' is given, it in addition tries to avoid that location (with both maximizing distance from enemies and going toward 'seek' taking priority).&lt;br /&gt;
* Both 'seek' and 'avoid' may consist of only one coordinate ('x' or 'y'), in which case not a single hex, but a line of hexes is sought or avoided.&lt;br /&gt;
&lt;br /&gt;
You can configure each coward using the following keys in the [micro_ai] tag:&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;coward&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''distance''': The distance within which an enemy must be to &amp;quot;scare&amp;quot; the unit&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''seek_x, seek_y''': The x and y coordinate of the hex to seek&lt;br /&gt;
* '''avoid_x, avoid_y''': The x and y coordinate of the hex to avoid&lt;br /&gt;
&lt;br /&gt;
Here's an example of a coward [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario: &lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=coward&lt;br /&gt;
             id=coward3&lt;br /&gt;
             distance=5&lt;br /&gt;
             seek_x,seek_y=24,5&lt;br /&gt;
             avoid_x,avoid_y=24,15&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Zone guardian (guardian_type=zone_guardian) ===&lt;br /&gt;
&lt;br /&gt;
==== *** Note: this Micro AI will be available starting with Wesnoth 1.11.3 *** ====&lt;br /&gt;
&lt;br /&gt;
A zone guardian is a unit that, as the name says, guards a zone. It moves randomly inside this zone until an enemy enters it (or a separately defined enemy zone, see below). Applications might be the defense of a castle or a nesting area.  The zone macro can be called with an optional SLF, [filter_location_enemy]:&lt;br /&gt;
* If not specified, the zone guard attacks any enemy coming inside its guard zone.&lt;br /&gt;
* If [filter_location_enemy] is given, it attacks any enemy entering this zone and once there are no more enemies, it goes back to patrol in its basic zone.&lt;br /&gt;
&lt;br /&gt;
You can configure each zone guardian using the following keys in the [micro_ai] tag: &lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''guardian_type''': Must be &amp;quot;zone_guardian&amp;quot;&lt;br /&gt;
* '''id''': The ID of the unit to which this AI should be attached&lt;br /&gt;
* '''[filter_location]''': A [[StandardUnitFilter|Standard Unit Filter]] designating the zone to guard.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''[filter_location_enemy]''': A [[StandardUnitFilter|Standard Unit Filter]] designating the zone where enemies have to be attacked.  If not given, it defaults to [filter_location].&lt;br /&gt;
&lt;br /&gt;
Here's an example of a zone guardian [micro_ai] tag usage from the &amp;quot;Guardians&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=guardian_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             guardian_type=zone_guardian&lt;br /&gt;
             id=zone3&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 x,y=22-31,4-11  # This is intentionally chosen to extend past the lake&lt;br /&gt;
                 terrain=W*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Healer Support Micro AI (ai_type=healer_support) ==&lt;br /&gt;
&lt;br /&gt;
The Healer Support Micro AI configures the healers of a side to stay behind the battle lines and heal injured and/or threatened units rather than participate in combat under all circumstances.  You can set different levels of aggressiveness for the healers.  Note that it is not always better to use this Micro AI than the default AI, as it takes healers (which can be strong units) away from the pool of units to choose for attacks.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Healers&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Healer Support Micro AI by putting&lt;br /&gt;
 {MICRO_AI_HEALER_SUPPORT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=healer_support&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Healer Support specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
There are no required keys.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting the healer units.  If set, only units passing this filter ''and'' having the healing ability are considered by this Micro AI.  '''Available from Wesnoth 1.11.3'''&lt;br /&gt;
*'''[filter_second]''': A [[StandardUnitFilter|Standard Unit Filter]] selecting units to receive healing. If set, only units passing this filter ''and'' the other healee selection filters will be selected for healing by this Micro AI.&lt;br /&gt;
* '''aggression'''=1.0: (float) Sets the aggressiveness of the AI.  This parameter is set up as a float to accommodate future functionality, but it currently acts as a boolean: if set to zero, the AI will never let its healers participate in combat, for all other values it allows them to attack after all other units have attacked and if the healers cannot find any more units to support.  The former behavior might be appropriate in scenarios with only one or few valuable healers, while the latter might work better in scenarios with many healers.&lt;br /&gt;
* '''injured_units_only'''=no: (boolean) If set to 'yes', the AI will only move healers next to units that are already injured and skip units that currently have full hitpoints, but might get injured during the next enemy turn.&lt;br /&gt;
* '''max_threats'''=9999: (integer) The maximum allowable number of enemies that can attack a hex in order for it to be considered for a healer.  As an example, setting 'max_threats=0' means that the AI only moves healers to locations that are entirely safe from the enemy (assuming that none of the units currently on the map dies).  Note that the value of this key is checked against the number of enemies that can make it to the hex, not the number of adjacent hexes from which the healer could be attacked.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Healer Support Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].&lt;br /&gt;
&lt;br /&gt;
This is an example of a Healer Support Micro AI configuration:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=healer_support&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             aggression=0&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Lurkers Micro AI (ai_type=lurkers) ==&lt;br /&gt;
&lt;br /&gt;
The Lurker Micro AI controls some or all units of a side in &amp;quot;lurker mode&amp;quot;.  A lurker is a unit that is capable of moving across most terrains, but that only stops on and attacks from specific terrain.  It might also have the ability to hide on this terrain (which is the reason why it is called a lurker).&lt;br /&gt;
&lt;br /&gt;
Lurkers move individually without strategy and always attack the weakest enemy within their reach.  If no enemy is in reach, the lurker does a random move instead - or it just sits and waits (lurks).&lt;br /&gt;
&lt;br /&gt;
For a demonstration of different types of lurker behavior, check out the &amp;quot;Lurkers&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Lurkers Micro AI by putting&lt;br /&gt;
 {MICRO_AI_LURKERS}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=lurkers&lt;br /&gt;
in the [micro_ai] tag&lt;br /&gt;
&lt;br /&gt;
===Lurkers specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
* '''[filter]''': Specifies which units of the side are controlled by the Lurker Micro AI.  This is a [[StandardUnitFilter|Standard Unit Filter]].  '''Note: this was called [lurkers] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': Specifies the terrain from which the lurkers attack. This is a [[StandardLocationFilter|Standard Location Filter]].  '''Note: this was called [attack_terrain] in 1.11.2'''&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
* '''[filter_location_wander]''': Specifies the terrain on which lurkers end their moves if there is no enemy in reach. This is a [[StandardLocationFilter|Standard Location Filter]].  If [filter_location_wander] is not given, it defaults to [filter_location].  '''Note: this was called [wander_terrain] in 1.11.2'''&lt;br /&gt;
* '''stationary'''=no: (boolean)  If set to yes, a lurker never moves if there is no enemy within attack range.&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Lurkers&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=4&lt;br /&gt;
             ai_type=lurkers&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [filter]&lt;br /&gt;
                 type=Naga Fighter&lt;br /&gt;
             [/filter]&lt;br /&gt;
             [filter_location]&lt;br /&gt;
                 terrain=W*,S*&lt;br /&gt;
             [/filter_location]&lt;br /&gt;
             [filter_location_wander]&lt;br /&gt;
                 terrain=W*&lt;br /&gt;
             [/filter_location_wander]&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Messenger Escort Micro AI (ai_type=messenger_escort) ==&lt;br /&gt;
&lt;br /&gt;
The Messenger Escort Micro AI lets you define a set of waypoints through which it tries to move one of its units, the messenger.  The other units escort the messenger, trying to protect it and attacking enemies that are in its way.  Note that the messenger might not strictly hit intermediate waypoints, but that getting close is good enough, especially if a waypoint is occupied by an enemy unit.  It does, however, always try to get to the last waypoint. &lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Messenger&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Messenger Escort Micro AI by putting&lt;br /&gt;
 {MICRO_AI_MESSENGER_ESCORT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=messenger_escort&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Messenger Escort specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''id''': The id of the messenger.  All other units of the side protect the messenger.&lt;br /&gt;
* '''waypoint_x,waypoint_y''': Comma-separated list of waypoint coordinates through which the messenger will go in the given order to reach its goal, given by the last coordinate.  If you want the messenger to go directly to the goal, simply enter a single x,y coordinate here.  Note that the messenger does not have to hit each waypoint exactly (except for the final one), getting close to them is good enough.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''enemy_death_chance'''=0.67 and '''messenger_death_chance'''=0.0: (both floats; ranging from 0 to 1)    If the messenger is adjacent to an enemy at the end of the move, it will only attack the enemy if the chance of death of the enemy is &amp;gt;= enemy_death_chance and if the messenger's chance of death is &amp;lt;= messenger_death_chance (or if it is an attack at a range for which the enemy does not have a weapon).&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Messenger Escort&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=messenger_escort&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             id=messenger&lt;br /&gt;
             waypoint_x=31,24,27,28&lt;br /&gt;
             waypoint_y=20,14,7,1&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Patrol Micro AI (ai_type=patrol_unit) ==&lt;br /&gt;
&lt;br /&gt;
The Patrol Micro AI attaches to an individual unit and defines a number of waypoints for that unit to follow.  Options can be set whether the route should be followed in a loop, as an out-and back, only once, whether units encountered along the way should be attacked, etc.&lt;br /&gt;
&lt;br /&gt;
No matter what options are chosen, getting to the next waypoint always takes priority over attacking for a patroller.  The AI thus prefers to move the patrol unit around enemies rather than straight for them.  Also, if a waypoint is occupied by a unit the AI is not instructed to attack, it will (eventually) abandon that waypoint once it gets close enough and move on to the next one.&lt;br /&gt;
&lt;br /&gt;
Multiple patrol units can be used on the same side, by setting up a separate [micro_ai] tag for each unit.&lt;br /&gt;
&lt;br /&gt;
For a demonstration of several different patrol behaviors, check out the &amp;quot;Patrols&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Patrol Micro AI by putting&lt;br /&gt;
 {MICRO_AI_PATROL}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=patrol_unit&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The [micro_ai] tag needs to be placed after the creation of the unit it controls in the scenario event.'''&lt;br /&gt;
&lt;br /&gt;
===Patrol specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''id''': The id of the patrol unit.&lt;br /&gt;
* '''waypoint_x,waypoint_y''': Comma-separated lists of the waypoint coordinates through which the patrol travels (in order).&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''out_and_back'''=no: (boolean)  By default, a patrol unit returns to the first waypoint after reaching the last, doing the patrol route as a loop.  If this parameter is set to 'yes', the unit instead reverses its course and perpetually does out and backs of the route.&lt;br /&gt;
* '''one_time_only'''=no: (boolean)  If set to 'yes', the unit goes through the patrol route only once and then hangs out at the last waypoint.  It also always attacks any enemy unit on the last waypoint, independent of what ''attack='' is set to.&lt;br /&gt;
* '''attack''': By default (if this key is not set), the patrol unit attacks any unit it ends up next to after a move.  Alternatively, this parameter can be set to a comma-separated list of unit ids. If that is done, the patrol only attacks these units when it ends up next to them and ignores any other unit.  This can in turn be used to have the patroller not attack at all, by setting ''attack='' to a non-existing id.&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;Patrols&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=2&lt;br /&gt;
             ai_type=patrol_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             id=Konrad&lt;br /&gt;
             waypoint_x=9,24,25&lt;br /&gt;
             waypoint_y=21,23,15&lt;br /&gt;
             one_time_only=yes&lt;br /&gt;
             attack=Gertburt&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Protect Unit Micro AI (ai_type=protect_unit) ==&lt;br /&gt;
&lt;br /&gt;
The Protect Unit Micro AI tries to move one or several units to a given location while keeping them safe from enem attacks. It does so by keeping the protected units away from enemy units and close to friendly units. Other units on the AI side are controlled by the default Wesnoth AI.&lt;br /&gt;
&lt;br /&gt;
For a demonstration, check out the &amp;quot;Protect Unit&amp;quot; and &amp;quot;The Elves Besieged&amp;quot; scenarios from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.&lt;br /&gt;
&lt;br /&gt;
Enable the Protect Unit Micro AI by putting&lt;br /&gt;
 {MICRO_AI_PROTECT_UNIT}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=protect_unit&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
===Protect Unit specific keys for the [micro_ai] tag:===&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[unit]''': A separate [unit] tag is required for each protected unit(s).  Each tag has required keys id=, goal_x=, goal_y= for each unit, as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''disable_move_leader_to_keep'''=no: (boolean) If set to 'yes', side leaders protected by this AI do not try to return to their keep.  This is necessary for this Micro AI to work with units that are side leaders and that are supposed to move to an off-keep location.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The Protect Unit Micro AI modifies the [[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|attacks aspect]].  Depending on the parameters, it might also modify the [[AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29|move leader to keep candidate action]].&lt;br /&gt;
&lt;br /&gt;
Here's an example of [micro_ai] tag usage from the &amp;quot;HttT: The Elves Besieged&amp;quot; test scenario:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             # Required keys of [micro_ai] tag&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=protect_unit&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             [unit]&lt;br /&gt;
                 id=Delfador&lt;br /&gt;
                 goal_x,goal_y=1,2&lt;br /&gt;
             [/unit]&lt;br /&gt;
             [unit]&lt;br /&gt;
                 id=Konrad&lt;br /&gt;
                 goal_x,goal_y=1,1&lt;br /&gt;
             [/unit]&lt;br /&gt;
 &lt;br /&gt;
             disable_move_leader_to_keep=true&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Recruiting Micro AI (ai_type=recruiting) ==&lt;br /&gt;
&lt;br /&gt;
The Recruiting Micro AI replaces the default recruitment AI by alternative recruiting patterns.  Currently there are two recruiting algorithms you can choose from, random recruiting and the rush recruiting used in the new (as of Version 1.11.1) Experimental AI (see below).&lt;br /&gt;
&lt;br /&gt;
For a demonstration of a different recruiting pattern, check out the &amp;quot;Recruiting&amp;quot; scenario from the [[Micro_AIs#Micro_AI_Test_and_Demo_Scenarios|test scenario]] or in the ''AI Modification Demos'' add-on.  You can also explore the unit choices by watching the Experimental AI in a multiplayer game.&lt;br /&gt;
&lt;br /&gt;
Enable the Recruiting Micro AI by putting&lt;br /&gt;
 {MICRO_AI_RECRUITING}&lt;br /&gt;
into the [side] tag and configure it by using&lt;br /&gt;
 ai_type=recruiting&lt;br /&gt;
in the [micro_ai] tag.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Obviously, the Recruitment Micro AI modifies the [[AiWML#Evaluating_AI_Moves_--_Candidate_Actions_.28CAs.29|recruitment candidate action]].&lt;br /&gt;
&lt;br /&gt;
=== Random Recruitment AI (recruiting_type=random) ===&lt;br /&gt;
&lt;br /&gt;
This AI randomly selects a unit type from the recruitment list of the side.  The probability of choosing each type and the behavior in low-gold situations can be influenced with optional parameters.&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''recruiting_type''': Must be &amp;quot;random&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''[probability]''': This tag sets the probability of selecting the given unit type.  It has two required sub-keys:&lt;br /&gt;
** '''type''': comma-separated list of unit types to which this probability is to be applied&lt;br /&gt;
** '''probability''': (non-negative float)  The probability with which these unit types is to be selected.  All unit types for which no [probability] tag is defined receive a default probability of 1.0, thus values should be chosen relative to that.  As an example, in the code below swordsmen and peasants are given a probability of 8, while no other units have assigned probabilities.  Thus, each of these two unit types is 8 times more likely to be selected than any other individual unit type.&lt;br /&gt;
* '''skip_low_gold_recruit'''=no: (boolean)  By default, the random recruitment AI chooses a unit to recruit only from those types for which it has sufficient gold.  If this parameter is set to 'yes', it will instead choose from all available unit types and end recruiting for the turn if there is not enough gold to recruit it this turn (even if other, affordable unit types exist).&lt;br /&gt;
&lt;br /&gt;
Here's an example of a random recruiting [micro_ai] tag usage from the &amp;quot;Recruiting&amp;quot; test scenario: &lt;br /&gt;
&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=recruiting&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             recruiting_type=random&lt;br /&gt;
             [probability]&lt;br /&gt;
                 type=Swordsman,Peasant&lt;br /&gt;
                 probability=8&lt;br /&gt;
             [/probability]&lt;br /&gt;
 &lt;br /&gt;
             skip_low_gold_recruiting=yes&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
=== Rush Recruitment AI (recruiting_type=rushers) ===&lt;br /&gt;
&lt;br /&gt;
This AI replaces the default recruiting with the rush recruiting used in the new (as of Version 1.11.1) Experimental AI.&lt;br /&gt;
&lt;br /&gt;
'''Required keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''recruiting_type''': Must be &amp;quot;rushers&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Optional keys:'''&lt;br /&gt;
&lt;br /&gt;
* '''randomness'''=0.1: (number)  A random number is applied to the rusher recruit engine's score to prevent the recruitment pattern from being too predictable. 0 causes no randomness to be applied, while larger numbers increase the random effect. A value of 1-2 generates results in which the random effect is approximately equal to the scored effect. Extremely high values are essentially entirely random.&lt;br /&gt;
&lt;br /&gt;
Rush recruiting is set up like this:&lt;br /&gt;
         [micro_ai]&lt;br /&gt;
             side=1&lt;br /&gt;
             ai_type=recruiting&lt;br /&gt;
             action=add&lt;br /&gt;
 &lt;br /&gt;
             recruiting_type=rushers&lt;br /&gt;
         [/micro_ai]&lt;br /&gt;
&lt;br /&gt;
== Other Potential Micro AIs ==&lt;br /&gt;
&lt;br /&gt;
The following Micro AIs might be added at some point.  Feel free to add to this list, if you have other ideas.&lt;br /&gt;
&lt;br /&gt;
* Leader support&lt;br /&gt;
* Targeted enemy poisoning&lt;br /&gt;
* Protect unit/location/area&lt;br /&gt;
* Annoying AI (grab targets and avoid fights as much as possible)&lt;br /&gt;
* Orderly retreat&lt;br /&gt;
&lt;br /&gt;
[[Category:AI]]&lt;/div&gt;</summary>
		<author><name>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50881</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50881"/>
		<updated>2013-05-03T16:11:58Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=Detailed Description=&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50880</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50880"/>
		<updated>2013-05-03T16:11:05Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50879</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50879"/>
		<updated>2013-05-03T16:09:45Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SoC2013Student}}&lt;br /&gt;
[[Category:SoC Ideas AI Defense Strategies 2013]]&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&amp;lt;h4&amp;gt;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50878</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50878"/>
		<updated>2013-05-03T15:57:01Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
I will stay with the project if I find the work enjoyable. I love gaming and creating games, and I would very much enjoy continuing to fine tune the AI for Wesnoth.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50877</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50877"/>
		<updated>2013-05-03T15:55:04Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 4) Project */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
I chose the &amp;quot;AI: Implement a 'total defense' strategy&amp;quot; project. I want to concentrate on having the AI naturally form battle lines as the result of extra heuristics added to the &amp;quot;enemy losses - aggression*own losses&amp;quot; formula.&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;
I chose this project because I have just taken an AI course in school, and I would like to be able to apply what I have learned in a more complex setting.&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;
May 3 - May 27:&lt;br /&gt;
&lt;br /&gt;
Final exams on 5/3, 5/6, 5/8, and 5/9.&lt;br /&gt;
Get experience playing the game.&lt;br /&gt;
Become familiar with the parts of the code that I'll be working with.&lt;br /&gt;
Improve proposal.&lt;br /&gt;
&lt;br /&gt;
May 28 - June 16:&lt;br /&gt;
&lt;br /&gt;
Speak with mentor about possible heuristics, how to apply them in the code, etc.&lt;br /&gt;
Begin coding simple naive implementations of heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Find a metric by which to measure the performance of the naive implementations against each other.&lt;br /&gt;
&lt;br /&gt;
July 15:&lt;br /&gt;
&lt;br /&gt;
Have more refined versions of the heuristics for testing.&lt;br /&gt;
&lt;br /&gt;
June 30:&lt;br /&gt;
&lt;br /&gt;
Have most of project done for intensive testing and debugging.&lt;br /&gt;
&lt;br /&gt;
August 16:&lt;br /&gt;
&lt;br /&gt;
Have project finished and as bug free as possible.&lt;br /&gt;
&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;
Will include when I have a chance to interact with the game and code more.&lt;br /&gt;
&lt;br /&gt;
4.6) What do you expect to gain from this project?&lt;br /&gt;
&lt;br /&gt;
I expect to gain experience working on a real world project with a large amount of code involved. I also want to gain experience working with other people's code, as well as working on open source projects.&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;
==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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50875</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50875"/>
		<updated>2013-05-03T15:31:17Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
==Minimize the number of enemy units that can get within attack range of vulnerable units==&lt;br /&gt;
&lt;br /&gt;
Simply put, if there are as few as possible enemy units that can get within attack range of vulnerable units, then the vulnerable units are as &amp;quot;safe&amp;quot; as they can be on the next enemy turn.&lt;br /&gt;
&lt;br /&gt;
==Maximize space between vulnerable units and enemy units==&lt;br /&gt;
&lt;br /&gt;
The intent of this heuristic would be to have the AI make moves that would result in naturally formed battle lines. If the less vulnerable/melee style units were moved first by the AI each turn with the &amp;quot;best&amp;quot; move heuristic being to maximize the number of moves it would take each enemy unit to get into attack range of more vulnerable units (e.g. ranged attackers), then it would be natural for them to make long &amp;quot;walls&amp;quot; or lines to prevent enemies from taking the most direct route.&lt;br /&gt;
&lt;br /&gt;
==Move vulnerable units into &amp;quot;safest&amp;quot; position that is still allows them to attack==&lt;br /&gt;
&lt;br /&gt;
After the melee units have moved to either completely block or maximally hinder enemy units from reaching vulnerable units, the vulnerable units should be moved to the safest position behind the battle line that allows them to attack enemy units.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50874</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50874"/>
		<updated>2013-05-03T15:17:36Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50872</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50872"/>
		<updated>2013-05-03T15:13:43Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* 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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I believe that the defense of the AI can be improved by aiming to move units into the best position, instead of simply maximizing the number of losses the enemy takes. To this end I propose the application of heuristics that would predict the &amp;quot;best&amp;quot; position to be in on the next turn. One such heuristic would be to maximize the number of spaces between vulnerable units and the attack range of enemy units; since defensive lines force longer paths to be taken to reach a particular space, they would naturally arise if the AI moved all of its units with a focus on this heuristic.&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50860</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50860"/>
		<updated>2013-05-03T14:00:12Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro. I am the current president of UNCG's chapter of the Association for Computing Machinery, and I'm also a member of the STARS Alliance, an organization intended to encourage high school and college students to pursue education and careers in computer science and IT.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50832</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50832"/>
		<updated>2013-05-03T04:32:06Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50829</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50829"/>
		<updated>2013-05-03T04:12:51Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from the Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50827</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50827"/>
		<updated>2013-05-03T03:54:08Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from the Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play game competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
Having played a few MMORPGs, Starcraft II, and programmed in a team setting, I am capable of taking advice, even if it is highly critical, in stride.&lt;br /&gt;
&lt;br /&gt;
3.6) Are you good at sorting useful criticisms from useless ones?&lt;br /&gt;
&lt;br /&gt;
Yes.&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 wants?&lt;br /&gt;
&lt;br /&gt;
I prefer to start coding and test things myself to see if the behavior created is desirable. I believe planning is necessary, but that code cannot be truly evaluated until it is realized.&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;
* Git (used for all commits) Yes.&lt;br /&gt;
* C++ (language used for all the normal source code) Yes.&lt;br /&gt;
* STL, Boost, Sdl (C++ libraries used by Wesnoth) Yes to the STL, not the other two.&lt;br /&gt;
* Python (optional, mainly used for tools) Yes.&lt;br /&gt;
* build environments (eg cmake/scons) I have used makefiles.&lt;br /&gt;
* WML (the wesnoth specific scenario language) No.&lt;br /&gt;
* Lua (used in combination with WML to create scenarios) No.&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;
For development I usually use Vim and Git, and compile in a terminal on Linux Mint. I prefer to use Vim because it allows me to work on any language on any operating system without having to change my development environment. I prefer compiling on the command line so that I know exactly what's going on when I compile/run my projects.&lt;br /&gt;
&lt;br /&gt;
5.3) What programming languages are you fluent in?&lt;br /&gt;
Java, C++, C, Python.&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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50826</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50826"/>
		<updated>2013-05-03T03:42:16Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from the Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play game competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&lt;br /&gt;
&lt;br /&gt;
2.5.4) Are you more interested in story or gameplay?&lt;br /&gt;
&lt;br /&gt;
I believe a good mix of story and fun gameplay mechanics is necessary for a good game, though fun mechanics can salvage a poor story, and a great story can salvage boring 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;
I have only just started the tutorial, but plan to play much more.&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 repository (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;
English is my native language.&lt;br /&gt;
&lt;br /&gt;
3.2) What spoken languages are you fluent in?&lt;br /&gt;
&lt;br /&gt;
English.&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;
I have played several MMORPGs and other online games, and I'm very familiar and comfortable with interacting with other players online.&lt;br /&gt;
&lt;br /&gt;
3.4) Do you give constructive advice?&lt;br /&gt;
&lt;br /&gt;
I work as a tutor in the computer science department at my school, so I feel that I am fairly good at giving advice without giving offense.&lt;br /&gt;
&lt;br /&gt;
3.5) Do you receive advice well?&lt;br /&gt;
&lt;br /&gt;
&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;
* Git (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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50823</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50823"/>
		<updated>2013-05-03T03:35:22Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: &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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from the Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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;
I have not participated before.&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;
I am not currently involved in an open source project.&lt;br /&gt;
&lt;br /&gt;
2.5) Gaming experience - Are you a gamer?&lt;br /&gt;
&lt;br /&gt;
I am a gamer, and have been since I owned an original NES system.&lt;br /&gt;
&lt;br /&gt;
2.5.1) What type of gamer are you?&lt;br /&gt;
&lt;br /&gt;
I like to play game competitively when I can, though I'm not excellent at any particular game. I enjoy the challenge from games with clever AI or obstacle courses, and I love to play against other humans.&lt;br /&gt;
&lt;br /&gt;
2.5.2) What type of games?&lt;br /&gt;
&lt;br /&gt;
I mostly enjoy platformers, RPGs, and strategy games. A few of my favorites are Dark Souls, Starcraft II, and The Binding of Isaac.&lt;br /&gt;
&lt;br /&gt;
2.5.3) What type of opponents do you prefer? &lt;br /&gt;
&lt;br /&gt;
I prefer human opponents if possible. Barring that I enjoy AI that is either particularly clever, or obstacle course type levels/opponents. I do not enjoy fighting opponents that are simply stronger than the player character and require large amounts of grinding to overcome.&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 repository (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;
* Git (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>Jleldridge</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50822</id>
		<title>User:Jleldridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Jleldridge&amp;diff=50822"/>
		<updated>2013-05-03T03:26:27Z</updated>

		<summary type="html">&lt;p&gt;Jleldridge: /* Questionnaire */&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;Jeffrey Eldridge - AI: Implement a 'total defense' strategy&amp;lt;/h4&amp;gt;&lt;br /&gt;
TODO: Write a small (1-4 sentences) description of your proposal here.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more first-level sections to detail your proposal&lt;br /&gt;
&lt;br /&gt;
=IRC=&lt;br /&gt;
jleldridge&lt;br /&gt;
&lt;br /&gt;
=Questionnaire=&lt;br /&gt;
Students wishing to participate in GSoC should copy the questions below to a new page and fill it with the answers. &lt;br /&gt;
&lt;br /&gt;
Please note that we generally plan to meet potential students through our IRC channel. So beside just answering these questions, potential candidates consider visiting us in IRC: #wesnoth-dev on irc.freenode.net. This is where most of our work takes place and participating in IRC is mandatory for GSoC students participating with Wesnoth. Our experience is that this is the easiest way to communicate and solve problems that come up.&lt;br /&gt;
&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;
My name is Jeffrey Eldridge. I am a senior studying computer science at the University of North Carolina at Greensboro.&lt;br /&gt;
&lt;br /&gt;
1.2) State your preferred email address.&lt;br /&gt;
&lt;br /&gt;
jleldridge27@gmail.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;
&lt;br /&gt;
jleldridge on both IRC and Wesnoth forums.&lt;br /&gt;
&lt;br /&gt;
1.4) Why do you want to participate in summer of code?&lt;br /&gt;
&lt;br /&gt;
I wish to participate in the Google summer of code in order to gain experience working with real code bases. I am particularly interested in working on open source projects when I graduate, as well as working with projects that are generally intended for open source operating systems such as Linux.&lt;br /&gt;
&lt;br /&gt;
1.5) What are you studying, subject, level and school?&lt;br /&gt;
&lt;br /&gt;
I am studying computer science at the University of North Carolina at Greensboro. I am a senior.&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;
I am from the Greensboro, North Carolina, USA. During the summer I can join the IRC at any time, but the most reasonable times will be between 8:00am and 11:00pm eastern standard time.&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;
I have no other commitments, and I have no current plans to take a vacation.&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;
I have worked on several simple programs for classes, including programs for a challenge course designed to test my ability to write programs using limited resources and having quick execution time. I have also participated in 2 local and 2 regional ACM programming contests, which required quick problem solving with similar program constraints as the aforementioned challenge course.&lt;br /&gt;
&lt;br /&gt;
I have also worked on a few side projects, mostly in java, for fun, which can be found at my github page: https://github.com/jleldridge&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;
I have participated in team programming during ACM programming contests, and during a Software Engineering course. The Software Engineering project that I was a part of was intended to be used by a non-profit organization, Parent to Parent, to replace work that was generally done by hand and on paper. The entire class (roughly 20 students) participated in the project, my portion can be found here: https://github.com/jleldridge/CSC340Project/tree/master/CSC340Project/src/matchingAlgorithm&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 repository (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;
* Git (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>Jleldridge</name></author>
		
	</entry>
</feed>