<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pedro Melendez - Game Programmer</title>
	<atom:link href="http://pedromelendez.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pedromelendez.com</link>
	<description>GAME PROGRAMMER</description>
	<lastBuildDate>Fri, 29 Jan 2010 02:42:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Decision-Making in game characters using Support Vector Machines &#8211; Description</title>
		<link>http://pedromelendez.com/decision-making-in-game-characters-using-support-vector-machines-description/</link>
		<comments>http://pedromelendez.com/decision-making-in-game-characters-using-support-vector-machines-description/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 02:42:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pedromelendez.com/?p=193</guid>
		<description><![CDATA[The final title of my dissertation was Decision-Making in game characters using Support Vector Machines. The main reason to change the title was because this one offers a better description about what the dissertation is about. It tries to check the feasibility of the use of support vector machines as a decision making algorithm for [...]]]></description>
			<content:encoded><![CDATA[<p>The final title of my dissertation was <strong>Decision-Making in game characters using Support Vector Machines</strong>. The main reason to change the title was because this one offers a better description about what the dissertation is about. It tries to check the feasibility of the use of support vector machines as a decision making algorithm for game characters. Thus, it was required to develop a software implementation which shows how support vector machines can be used for this purpose. As a proof of concept, an approach to achieve continuous learning is evualated as well. The idea was to develop a label feedback mechanism, which adds new labelled points to the training set and retrains the algorithm when an oportunity for improvement is detected.</p>
<p><img src="http://pedromelendez.com/wp-content/uploads/2010/01/svmcontroller.png" alt="svmcontroller" title="svmcontroller" width="600" class="alignright size-full wp-image-195" /></p>
<p>The figure above shows the general diagram of the solution developed for the dissertation. From an abstract perspective, the approach proposed is similar to any other traditional model like FSM. The character will process some input, more often called internal or external knowledge depending if the information was taken from the character (internal) or from the environment (external). The input is presented in a numerical format to a previously trained SVM which will return the index of the action to be taken. While the action is being performed, a label feedback mechanism called in this dissertation as a <em>quality function</em> (very similar to the role of a fitness function in a GA) will evaluate if the input is suitable to improve the training set.<br />
<br />
In the case that the quality function detects that an improvement has to be made, it will add a new row in the training set which is labelled with a proper tag, then the SVM will be retrained. </p>
<h3>Input Data</h3>
<p>In order to be processed the input data has to be prepared in a numerical format. The training set was designed to encourage taking decisions similar to the FSM solution used in the comparison. The figure below shows an explanation about how the training set was built. Each row in the training set has a relation with some transition in the FSM. For example if there is an Action 1 in the FSM which has a transition to the Action 2 when a variable target is equal to 1. It<br />
would be in the training set a row with previous action equal to 1, the target value equal to 1 and the resulting label as 2 (mapping in this way to Action 2 ).</p>
<p><img src="http://pedromelendez.com/wp-content/uploads/2010/01/inputdata1.png" alt="inputdata" title="inputdata" width="600" class="alignright size-full wp-image-213" /></p>
<h3>Testbed Game : Happmann</h3>
<p>Happmann is a third person shooter with a deathmach-style gameplay intended to be played on a local network . The camera system was designed to allow players to see most of the battlefield, and thus all of the action can be seen. The game was developed as a course project for the module <em>CS1170 Game Design and Development</em> which is part of the<strong> MSc Computer Games Technology</strong> offered by University of Abertay Dundee.</p>
<p>Since the original game lacks a single player option and the source code was available and familiar, it was chosen with the idea of being a proper option as a test-bed game to conduct experiments.</p>
<h3> Learning Mechanism</h3>
<h4>Offline Learning</h4>
<p>Although my dissertation uses an online learning mechanism to tune the solution at runtime, some offline learning tasks were required such as the initial training phase. The input data was transformed and scaled and later it was trained using a RBF Kernel.</p>
<h4>Online Learning </h4>
<p>Online Learning is the ability of a system to learn from its own predictions or results. Note that this learning experience is not necessarily at runtime, but it has to be performed without human supervision. For the case of this dissertation, the input data was simple enought to allow the learning process at runtime, but this probably would not be the case with more complex data.</p>
<p>As an online learning system will tune its knowledge without supervision, it is necessary to have a label feedback mechanism to add new input data and perform the retraining of the algorithm. The mechanism proposed is a function named in this dissertation as a <em>Quality Function</em>. </p>
<p>The main goal of this quality function is to check guidelines that could be violated during the execution of the game. As a prof of concept, the quality function in this dissertation checks for oscillations, repeated actions and as a stopping criteria when the character is returning. </p>
<p>Although simplistic the quality function presented before shows how general guidelines can be defined to tune misbehaviours while the game is running. It could be written in a more complex way to define strategic guidelines or to adapt difficulty parameters. However, the goal of this dissertation is to show if the method proposed is viable to achieve online learning and did not pretend to explore all the possible ways about how the learning mechanism can be defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://pedromelendez.com/decision-making-in-game-characters-using-support-vector-machines-description/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling Non-player characters using SVM &#8211; Extended Abstract</title>
		<link>http://pedromelendez.com/controlling-non-player-characters-using-svm-extended-abstract/</link>
		<comments>http://pedromelendez.com/controlling-non-player-characters-using-svm-extended-abstract/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 01:14:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pedromelendez.com/controlling-non-player-characters-using-svm-extended-abstract/</guid>
		<description><![CDATA[Here is a link to the extended abstract of my (still on going) dissertation. It explains in a little more formal way the work that I am developing right now. In the next days I will be posting the method proposed and how I am going to test the quality of the results.
]]></description>
			<content:encoded><![CDATA[<p>Here is a <a href="http://portal.acm.org/ft_gateway.cfm?id=1639621&#038;type=pdf&#038;coll=GUIDE&#038;dl=GUIDE&#038;CFID=61461258&#038;CFTOKEN=16933602" target="_blank">link</a> to the extended abstract of my (still on going) dissertation. It explains in a little more formal way the work that I am developing right now. In the next days I will be posting the method proposed and how I am going to test the quality of the results.</p>
]]></content:encoded>
			<wfw:commentRss>http://pedromelendez.com/controlling-non-player-characters-using-svm-extended-abstract/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling Non-player characters using Support Vector Machines</title>
		<link>http://pedromelendez.com/controlling-non-player-characters-using-support-vector-machines/</link>
		<comments>http://pedromelendez.com/controlling-non-player-characters-using-support-vector-machines/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 15:45:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pedromelendez.com/?p=87</guid>
		<description><![CDATA[Hello, this is the very first post in this blog (with the exception of the hello word! post) and it will show an overview of my planned work for my dissertation. Actually this blog is intended to show all the advances in my dissertation work.
The main idea of my thesis is to control non player [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, this is the very first post in this blog (with the exception of the hello word! post) and it will show an overview of my planned work for my dissertation. Actually this blog is intended to show all the advances in my dissertation work.</p>
<p>The main idea of my thesis is to control non player characters using the machine learning technique known as Support Vector Machines. Support Vector Machines (SVMs) are a set of statistical learning methods which have some properties that make them very suitable in order to be used as controller for nonplayer characters (NPCs). Unlike artificial neural networks, SVMs will not produce several solutions for a specific training set but one optimal solution that maximizes the distance between classes which is known as the margin.</p>
<p>The plan is to have a set of basic behaviours which would be triggered using a trained SVM. In other words, the SVM will take only the decisions about when a specific behaviour has to be triggered. The training set would consist in a set of “rules” coded in a numerical format so can be processed properly by the classifier.  For example, let&#8217;s say that we want to control an AI agent in a third person shooter game and we want to establish some rules like “if you have plenty of health and bullets and you are facing an enemy then you have to attack”. To address that we could define three variables like health, ammo and enemies near and a target action that could represent an index to a predefined behaviour like attack. This is shown in the following the table:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="160" valign="top"><strong>Health</strong></td>
<td width="160" valign="top"><strong>Ammo</strong></td>
<td width="160" valign="top"><strong>Enemies   Near</strong></td>
<td width="160" valign="top"><strong>Behaviour</strong></td>
</tr>
<tr>
<td width="160" valign="top">100</td>
<td width="160" valign="top">20</td>
<td width="160" valign="top">1</td>
<td width="160" valign="top">1 (Attack)</td>
</tr>
<tr>
<td width="160" valign="top">100</td>
<td width="160" valign="top">20</td>
<td width="160" valign="top">0</td>
<td width="160" valign="top">2 (Explore)</td>
</tr>
<tr>
<td width="160" valign="top">20</td>
<td width="160" valign="top">2</td>
<td width="160" valign="top">1</td>
<td width="160" valign="top">3 (Run Away)</td>
</tr>
<tr>
<td width="160" valign="top">80</td>
<td width="160" valign="top">10</td>
<td width="160" valign="top">1</td>
<td width="160" valign="top">1 (Attack)</td>
</tr>
<tr>
<td width="160" valign="top">80</td>
<td width="160" valign="top">5</td>
<td width="160" valign="top">2</td>
<td width="160" valign="top">3 (Run Away)</td>
</tr>
<tr>
<td width="160" valign="top">50</td>
<td width="160" valign="top">2</td>
<td width="160" valign="top">0</td>
<td width="160" valign="top">2 (Explore)</td>
</tr>
</tbody>
</table>
<p>A second component of the plan of my thesis is to achieve learning after purchase. The main goal is to detect decisions that can compromise the proper behaviour of the NPC and create a “rule” (a row in the training set really) in the training set and train again the SVM. Since SVM will produce only one solution for a set of parameters and a training set, we have “some” guarantees that the NPC should not have strange behaviours because of an inappropriate solution for the training set, still the challenge is to guarantee that the new example in the training set will not compromise the quality of the result.</p>
<p>This post is intended to be an overview of the work I am going to be doing on the next 4 months. I hope to publish details and some results as soon as I get them. Please be my guest if you want to make some comments or give some feedback of my work.</p>
]]></content:encoded>
			<wfw:commentRss>http://pedromelendez.com/controlling-non-player-characters-using-support-vector-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

