<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF
	xmlns="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel rdf:about="http://feeds.garagegames.com/rss/blogs/developer/49475/">
		<title>Blog for Mathieu Marquis-Bolduc at GarageGames.com</title>
		<description>Blog feeds for Gamers and Developers in the GarageGames community.</description>
		<link>http://www.garagegames.com/</link>
		<image rdf:resource="http://www.garagegames.com/images/GarageGames_logo_small_w.gif" />
		<dc:date>2008-10-13T20:55:27+00:00</dc:date>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/12269"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/11312"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/10767"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/10744"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/10460"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/9963"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/49475/7402"/>
			</rdf:Seq>
		</items>
	</channel>
	<item rdf:about="http://www.garagegames.com/blogs/49475/12269">
		<dc:format>text/html</dc:format>
		<dc:date>2007-02-07T21:16:44+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>The long path to AI</title>
		<link>http://www.garagegames.com/blogs/49475/12269</link>
		<description>Heya all!&lt;br&gt;&lt;br&gt;Long time since my last update, and big changes too.&lt;br&gt;&lt;br&gt;First, a lot has been going in my personnal life. Ive been struggling to finish my master degree. I am almost there, when that is finished, it should leave me much more time for hobby development. Publishing scientific articles is such a pain... Second, I am changing job! Not only changing job, but changing country and continent too, as I will be moving from Canada to the Netherlands for a very exciting job over there. Yay! Hope I'll have a good time.&lt;br&gt;&lt;br&gt;Since my last blog update, I have been busy discussing publishing options, and preparing my AI package for external testing. One of these steps was writing the User Manual, so that the kind people helping me test would not feel totally lost. Writing about your work make you realise a lot of things about it. One of the thing I realized writing the manual is that the GOAD tool was not as intuitive to use as I would have thought. It is very intuitive to me, but I see now that its complexity of use might overcome its usefulness for somebody else. So Im currently putting this tool on Idle while I figure out how to make it simpler to use. Maybe replacing it by a less general but simpler Sport AI tool.&lt;br&gt;&lt;br&gt;Another thing I have been pondering is a comment on the forums. A kind Torque User commented that while the planner tool seems powerful, the best AI is useless without a pathfinding system (for most games). I have to agree, currently there is few pathfinding options for Torque users. My planner demo use a place-holder pathfinding sytem that is not suitable for any practical use. So in the last holidays Ive been working on a nifty pathfinding tool. The tool is based on navigation meshes. 3 steps to use it:&lt;br&gt;&lt;br&gt;-&amp;gt; Automatically create a navigation mesh from the terrain geometry&lt;br&gt;-&amp;gt; Adding custom navigation links (doors, ladders, jumping over ledges, etc)&lt;br&gt;-&amp;gt; Finding paths in real-time in the game&lt;br&gt;&lt;br&gt;Im almost finished with the first (and most difficult) step. I'll try to upload some images latter. Its been kind of a pain to learn the very various methods of collision detection TGE use, but I learned a lot in the end. Another thing what slowed me down is the Vector class in TGE, which tries to emulate its STL equivalent but really have a lot of flaws, I lost a LOT of time dealing with it, and Im considering banning the thing from my code. For example, when allocating memory, this Vector class does not seem to call the appropriate constructor, and its iterators are, well, deficient. Anyway! Its become a pet peeve of mine. Navigation meshes are really powerful for pathfinding and other AI use, so I think the work will be worth it in the end. Excluding all of the static geometry from the mesh is not all easy, lots of numericals problems there. It already works, but not well enough yet.&lt;br&gt;&lt;br&gt;I really dont know how complex step 2 will be. I want so start simple and add more as needed.&lt;br&gt;Step 3 should be a piece of cake, I have done things like that for a long time now. &lt;br&gt;&lt;br&gt;I think this tool could be usefull to a lot of TGE user, if I can pull it off.&lt;br&gt;&lt;br&gt;Well, thats it! No idea when everything will finally be ready. Its almost a year since Ive started working on this, Ive been quite busy with the rest of my life, but thats the joy of hobby development. Thanks for everyone's comments and support, and sorry for the people who have been waiting for so long.&lt;br&gt;To summarize:&lt;br&gt;&lt;br&gt;Bad news:&lt;br&gt;&lt;br&gt;-GOAD tool on hold&lt;br&gt;-Master degree still now finished&lt;br&gt;-Busy with moving to Europe&lt;br&gt;&lt;br&gt;Good news:&lt;br&gt;&lt;br&gt;-Project still ongoing, if slowly!&lt;br&gt;-Moving to Europe for a new job&lt;br&gt;-Master degree *almost* finished&lt;br&gt;-Pathfinding tool in the works</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/49475/11312">
		<dc:format>text/html</dc:format>
		<dc:date>2006-09-23T00:36:22+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>Planner AI video demo</title>
		<link>http://www.garagegames.com/blogs/49475/11312</link>
		<description>Hi everybody!&lt;br&gt;&lt;br&gt;After a few months of hard work, here is the second AI system that I wish to include in my &lt;br&gt;AI toolkit: A planner system!&lt;br&gt;&lt;br&gt;Planners are one of the most powerful AI tools available to game developpers. A very similar&lt;br&gt;planner is at the core of award-winning F.E.A.R.'s AI*. In fact, I developped this tool after&lt;br&gt;discussions with Monolith's Brian L, and thanks to Jeff Orkins papers (also from Monolith).&lt;br&gt;&lt;br&gt;So how does a planner work? Simple. It finds the best sequence of action (a plan) that should take an &lt;br&gt;AI agent from his current state to a certain goal state. What makes a planner so different&lt;br&gt;is that a lot more of the thinking is done by the AI, so thats a lot less by the AI designer.&lt;br&gt;&lt;br&gt;I made a shooter demo featuring the planner engine.  &lt;br&gt;&lt;a href='http://www.youtube.com/watch?v=Ln75w7bwvkg' target=_blank&gt; You can view a video of it here on YouTube&lt;/a&gt;. &lt;br&gt;Please tolerate my programmer's map editing skills!&lt;br&gt;&lt;br&gt;If used correctly, an AI using a planner will be very good at adapting itself to unexpected&lt;br&gt;situations. As I said, they are also dead easy to use. Taking apart actual debugging of the planner,&lt;br&gt;setting up the AI for the shooter demo barely took an hour.&lt;br&gt;&lt;br&gt;Like my &lt;a href='http://www.garagegames.com/blogs/49475/10767'&gt; previously presented GOAD system&lt;/a&gt;, the planner is configured using an XML file. &lt;br&gt;There are just two sections to this file. The first one list all available actions. For each action, you simply need to mention&lt;br&gt;what part of the goal state can it helps with and what does that action requires. An improvement to the FEAR&lt;br&gt;planner architecture is that I also allow you to specify under which conditions it is best to use that action.&lt;br&gt;&lt;br&gt;An action example from the demo, syntax subject to change:&lt;br&gt;&lt;br&gt;&amp;lt;ACTION Name = &amp;quot;AttackTarget&amp;quot;&amp;gt;&lt;br&gt;	&amp;lt;ARG Name = &amp;quot;x&amp;quot; /&amp;gt;&lt;br&gt;	&amp;lt;CHANGE&amp;gt;&lt;br&gt;		&amp;lt;CONDITION Name = &amp;quot;IsAttacked&amp;quot; &amp;gt;&lt;br&gt;			&amp;lt;ARG Name = &amp;quot;x&amp;quot; /&amp;gt;&lt;br&gt;		&amp;lt;/CONDITION&amp;gt;	&lt;br&gt;	&amp;lt;/CHANGE&amp;gt;&lt;br&gt;	&amp;lt;REQUIRE&amp;gt;&lt;br&gt;		&amp;lt;CONDITION Name = &amp;quot;AtTarget&amp;quot; &amp;gt;&lt;br&gt;			&amp;lt;ARG Name = &amp;quot;x&amp;quot; /&amp;gt;&lt;br&gt;		&amp;lt;/CONDITION&amp;gt;	&lt;br&gt;		&amp;lt;CONDITION Name = &amp;quot;HaveWeapon&amp;quot; LongValue = &amp;quot;1&amp;quot; /&amp;gt;&lt;br&gt;		&amp;lt;CONDITION Name = &amp;quot;HaveAmmo&amp;quot; LongValue = &amp;quot;1&amp;quot; /&amp;gt;&lt;br&gt;	&amp;lt;/REQUIRE&amp;gt;&lt;br&gt;	&amp;lt;RULE&amp;gt;&lt;br&gt;		&amp;lt;CLAUSE Name = &amp;quot;Always&amp;quot; /&amp;gt;&lt;br&gt;	&amp;lt;/RULE&amp;gt;&lt;br&gt;&amp;lt;/ACTION&amp;gt; &lt;br&gt;&lt;br&gt;This tells the planner that the action &amp;quot;&amp;quot;AttackTarget(x)&amp;quot; will try to solve the goal &amp;quot;IsAttacked = x&amp;quot;.&lt;br&gt;It also tells that this actions require the agent to be near the target x, and have a weapon and ammunition.&lt;br&gt;Finally, it tells us that Attacking the target is actually *Always* an ideal option to solve the &amp;quot;IsAttacked&amp;quot; goal.&lt;br&gt;&lt;br&gt;That is the descriptive part of the behavior. I feel that it is key, when designing AI, to separate the behavior &lt;br&gt;description from the action's implementation. As with the previous GOAD system, I wrote all necessary C++ code&lt;br&gt;to link the planner with torquescript. Lets see how the &amp;quot;AttackTarget(x)&amp;quot; action behavior is implemented in Torque Script.&lt;br&gt;&lt;br&gt;function AIPlayer::AttackTargetApply(%this, %target)&lt;br&gt;{&lt;br&gt;	%this.lSetStateVar(&amp;quot;IsAttacked&amp;quot;, %target);	&lt;br&gt;}&lt;br&gt;&lt;br&gt;function AIPlayer::AttackTargetExecute(%this, %target)&lt;br&gt;{&lt;br&gt;	%this.setAimObject(%target, &amp;quot;0 0 1&amp;quot;);&lt;br&gt;	%this.fire(1);&lt;br&gt;}&lt;br&gt;&lt;br&gt;Yes, its as dumb as that. Each action has two function attached to it. The &amp;quot;Apply&amp;quot; function is used at planning time, &lt;br&gt;and set the changes in the current state. The &amp;quot;Execute&amp;quot; function is used when executing the plan.&lt;br&gt;&lt;br&gt;The last bit of AI configuration is to define each class of AI. The only thing you need to go is to list the actions&lt;br&gt;that are available to each kind of agents/NPCs/Bots in your game. Here is the whole thing from the demo:&lt;br&gt;&lt;br&gt;&amp;lt;CLASS Name = &amp;quot;Dummy&amp;quot;&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;Wait&amp;quot; /&amp;gt;&lt;br&gt;&amp;lt;/CLASS&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;CLASS Name = &amp;quot;Kork the Mighty&amp;quot;&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;PullLever&amp;quot; /&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;GotoObject&amp;quot; /&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;PickupAmmo&amp;quot; /&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;PickupWeapon&amp;quot;/&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;AttackTarget&amp;quot;/&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;GotoTarget&amp;quot;/&amp;gt;&lt;br&gt;	&amp;lt;ACTION Name = &amp;quot;GotoNode&amp;quot;/&amp;gt;&lt;br&gt;&amp;lt;/CLASS&amp;gt;&lt;br&gt;&lt;br&gt;Planner systems are not suitable to all games. For example, it would be harder to use for a sport game, where you dont typically plan a lot of things in advance, but rather react as things unfold. However,they seems to be ideal for tactical shooters. They could also be great for strategy games, both turn based and RTS, as well as role-playing games with complex NPCS (like the Elder Scrolls or Gothic series). It can also be a very good idea to use both the GOAD system and the planner system together! For example, you could use the GOAD to keep track of currents goals and decide which one is most important, then use the planner to find a way to solve the critical goal.&lt;br&gt;&lt;br&gt;Well, thats all I have to say now about the planner. From now, I am wrapping things up to a state where I will be able to begin beta testing. Things like writing the manual, and safe-profing everything against memory leaks and exceptions. I already have several people interested in beta-testing the GOAD system (Thanks guys!). If you are interested in beta-testing the planner, please contact me directly. If you have ideas about what kind of AI tools you would like to see in future versions of the toolkit, you can post them &lt;a href='http://www.garagegames.com/mg/forums/result.thread.php?qt=51082'&gt; here. &lt;/a&gt;&lt;br&gt;&lt;br&gt;Some ending word: My main goal with this project is to provide amateur and professionnal game developpers with the most advanced AND efficient AI systems. While I strive to make them the easiest to use, you will still need moderate game programming skills to use them, and some talent with AI to exploit&lt;br&gt;them to their fullest.&lt;br&gt;&lt;br&gt;Thanks again for your interest in this project, it makes all the hard work worth it. I can only hope my AI tools will live up to your expectations.&lt;br&gt;&lt;br&gt;Mathieu Marquis Bolduc&lt;br&gt;&lt;br&gt;&lt;br&gt;Foot-notes:&lt;br&gt;&lt;br&gt;*A few words on the FEAR thing. There is a LOT more about FEAR's AI than just a planner. &lt;br&gt;Targeting system, pathfinding, squad coordination, etc. But the planner is what determines&lt;br&gt;the NPC's actions. Big thanks to Jeff Orkins and Brian from Monolith Productions for sharing their ideas and&lt;br&gt;experiments.&lt;br&gt;&lt;br&gt;**By the way, both video demos are running in debug mode while recording with Fraps. If used correctly, performance is &lt;br&gt;excellent. However, to have good performance, its is primordial that all information needed by the planner be readily&lt;br&gt;available. In middle of planning is not a good time to do ray casting or terrain analysis! You can use the other 99% of&lt;br&gt;cycles when the AI is not planning to do that other stuff.</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/49475/10767">
		<dc:format>text/html</dc:format>
		<dc:date>2006-06-24T00:48:57+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>Football AI demo movie</title>
		<link>http://www.garagegames.com/blogs/49475/10767</link>
		<description>Hey everybody,&lt;br&gt;&lt;br&gt;Due to popular demand (thats at least 3 people!), I've uploaded a video showing my football AI demo in action. You can see it &lt;a href='http://video.google.com/videoplay?docid=-7479087951631947711' target=_blank&gt;here on google video&lt;/a&gt;. I apologize for the severe compression, can't do better.&lt;br&gt;&lt;br&gt;I've mainly worked on the offensive play. I seems simple when you see it in action, but there is a lot to it!&lt;br&gt;The demo currently features:&lt;br&gt;&lt;br&gt;7 goals and sub-goals;&lt;br&gt;&lt;br&gt;PlayBall, CatchBall, GrabFreeBall, Offense, OffenseWithBall, OffenseWithoutBall, Defense, ProtectPlayer&lt;br&gt;&lt;br&gt;8 possible actions, (that are often combined);&lt;br&gt;&lt;br&gt;RunToGoal, AvoidEnemyPlayers, RunToBall, SeparateFromPlayers, RunToPlayer, CallProtectPlayer, PassToPlayer, InterposeBetween, StayInPassDistance&lt;br&gt;&lt;br&gt;3 events;&lt;br&gt;&lt;br&gt;Kickoff, BallCatched, BallThrown&lt;br&gt;&lt;br&gt;and a grand total of 11 logic clauses:&lt;br&gt;&lt;br&gt;BallClose/IsCloseToBall, BallHolderInMyTeam, IsBallHolder / HaveBall, AreClose, Protected, InDanger/IsInDanger, InThrowDistance, Always.&lt;br&gt;&lt;br&gt;At first it is a lot of work, even with the fully operational AI engine. But once you reach a critical mass of goals, events, actions and clause to work with, you can add new behaviors with real ease, just by playing in the behavior rules script file.&lt;br&gt;&lt;br&gt;I will most probably include this full demo when I'll release the AI engine to the public. The demo is by no mean a functionnal football game, but I think it will work nicely at exposing how to work with the decision making engine. The latter should come as a dynamic link library, with mandatory header files and all necessary and usefull bits of code and scripts to make it run great with TGE.</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/49475/10744">
		<dc:format>text/html</dc:format>
		<dc:date>2006-06-19T23:59:48+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>AI engine shaping up</title>
		<link>http://www.garagegames.com/blogs/49475/10744</link>
		<description>Well, I had a 3-pages blog entry written, but that was before I found out you should NOT use accents, it erases the whole thing. So Im just gonna sum it up...&lt;br&gt;&lt;br&gt;My AI decision-making engine is going on pretty well. I now have a demo of 6 korks playing touch football. Their behavior is described in a XML feed. The Torque engine sends gameplay events and information to the AI engine, who apply this information to the behavior rules, and reacts by updating each agent's goal stack and executing actions in the Torque Engine. Right now in the demo, those actions are mainly activating steering behaviors to make the players go around.&lt;br&gt;&lt;br&gt;The AI engine is finally using variables, which was a huge milestone. I can now have behavior rules that reads like &amp;quot;Protect X against Y if X have the ball and Y is running toward X&amp;quot;. X and Y can be anything, as long as you can express it in a 32 bit value. The engine never actually interpret those symbols, it just pass them back and forth to the game engine.&lt;br&gt;&lt;br&gt;After I improve that demo a bit, there is two features I want to implement in the AI engine. First, verbatim. I want the AI agents to be able to explain, if asked, &lt;i&gt;why&lt;/i&gt; they decided to perform an action. That shouldnt be too hard. Next, I want to implement behavior inheritance. For example, you could describe the behavior class &amp;quot;dog&amp;quot;, and the behavior class &amp;quot;football player&amp;quot;. Then, you will be able to create an agent that mixes both behavior class. You will then get a dog that plays football. Or an agent that plays football like a dog ;)</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/49475/10460">
		<dc:format>text/html</dc:format>
		<dc:date>2006-05-12T03:46:44+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>Catch the ball</title>
		<link>http://www.garagegames.com/blogs/49475/10460</link>
		<description>Well, I finally found a few hours tonight to work on my AI engine and demo.&lt;br&gt;&lt;br&gt;I now have a new agent (&amp;quot;Catcher&amp;quot;) in my demo. He will stand around, watching me and waiting for me to throw a ball. When I throw the ball, he will run to it and try to catch it before I do.&lt;br&gt;&lt;br&gt;This may sound simple, but in fact I added several new functionalities to the AI engine. The main of these functionalities is event handling. In this case, I used the events &amp;quot;BallThrown&amp;quot; and &amp;quot;BallCatched&amp;quot;. The agent decide on how to react to those events depending on its current stack of goals, as well as conditions set in the AI script. For example, in my demo the event  &amp;quot;BallThrown&amp;quot; make the goal &amp;quot;waitforthrow&amp;quot; succeed, while the event &amp;quot;BallCatched&amp;quot; make the &amp;quot;CatchBall&amp;quot; goal succeed, but only if the agent is the one who catched it. They could also make the agent perform an action, or add a new goal.&lt;br&gt;&lt;br&gt;I also worked on making my XML-based AI script simpler and mostly shorter. The behavior described on top is all described in a very tiny XML script.&lt;br&gt;&lt;br&gt;I need to think a bit about how to best handle the goals when a goal fails. Then I can move on to tackle the next big feature, clause arguments. Write now, I only use logical clauses similar to &amp;quot;Athenian()&amp;quot;. I need to move on to something like &amp;quot;Athenian( Socrate )&amp;quot;. Arguments are already supported in the engine interface, that is the AI engine can already pass arguments to the actual game (and vice-versa). But it is not yet done in the AI script. The major problem with arguments in a logical script language is the unification of variables. Im not sure if it will be an issue right now, but I have to think ahead.&lt;br&gt;&lt;br&gt;Well, enough for tonight!</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/49475/9963">
		<dc:format>text/html</dc:format>
		<dc:date>2006-03-05T03:33:51+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>Row Row Row the boat... (he's gonna need one)</title>
		<link>http://www.garagegames.com/blogs/49475/9963</link>
		<description>Its been a long time since I last had time to work on Torque.&lt;br&gt;Im now working full time at a very interesting place, but unfortunatly I havent quite finished my master degree yet, which means that I have very little free time for my &amp;quot;own&amp;quot; projects.&lt;br&gt;&lt;br&gt;Ive begun working on what I think will be a very good AI engine. The engine itself is coded completely outside Torque and available as a DLL. Ive been working on the necessary linking with the Torque engine and today it finaly worked! Of its own free will (given by the AI engine), Kork the Ork decided to run directly to the (0,0,0) point, which means that he headed directly trough the bottom of the lake, emerged on the other side and continued running as if not wet at all.&lt;br&gt;&lt;br&gt;So what is currently done and working: (in no particular order)&lt;br&gt;&lt;br&gt;-Loading of AI rules in XML scripts.&lt;br&gt;-Interfacing with Torque&lt;br&gt;-Agent creation&lt;br&gt;-Simple Decision making&lt;br&gt;-Goal stacking&lt;br&gt;-Clause and Actions callbacks&lt;br&gt;-Error Management&lt;br&gt;&lt;br&gt;The initial problems encountered while interfacing with Torque were a good thing in the end. They forced me to make my engine more flexible and robust, and forced me to implement the error management right away. Now errors in the AI engine will print themselves in the console.&lt;br&gt;&lt;br&gt;Next step is to make Kork run around just like before, then script a slightly more interesting Ork featuring more goals.</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/49475/7402">
		<dc:format>text/html</dc:format>
		<dc:date>2005-03-20T23:20:10+00:00</dc:date>
		<dc:creator>Mathieu Marquis-Bolduc</dc:creator>
		<title>Sunday Mar 20 23:20</title>
		<link>http://www.garagegames.com/blogs/49475/7402</link>
		<description>After having spent some time exploring the SDK to get a good feel of it, I think its time I begin to implement some of the basic stuff I will need. I finally can compile everything with Eclipse thanks the to TBE.&lt;br&gt;&lt;br&gt;The first think Im implementing is the object picking tool, since it should be a basis for many of the rpg functionnality. Also it should allow me to learn more about the mouse and event system, which will be usefull to implement the camera scheme I plan to use.&lt;br&gt;&lt;br&gt;Tought of the day:&lt;br&gt;&lt;br&gt;&amp;quot;After bread, education is the first need of people&amp;quot;</description>
	</item>
</rdf:RDF>
