<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Time Trial</title>
	<atom:link href="http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/</link>
	<description>After all, it could only cost you your life, and you got that for free.</description>
	<pubDate>Thu, 04 Dec 2008 23:13:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Paul Kuliniewicz</title>
		<link>http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/#comment-962</link>
		<dc:creator>Paul Kuliniewicz</dc:creator>
		<pubDate>Mon, 07 Aug 2006 21:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://web.ics.purdue.edu/~kuliniew/wp/archives/2006/08/01/time-trial/#comment-962</guid>
		<description>First off, I'm probably being sloppy with using the terms "genetic algorithms" and "genetic programming," so try not to read too much into my word choice.

The basic approach I have in mind is to generate a bunch of random controller sequences, see which ones fare best, mutate/crossover/etc, and repeat.  I know there's a lot of parameters and strategies to choose from in there, and I haven't yet decided just how I'll approach it.

Right now, my fitness functions are going to be pretty simple.  From a purely implementation point of view, it wouldn't be hard to make it a lot more sophisticated.  However, I have no idea how to put a GUI in front of something like that without making it completely arcane.

Besides, I'm curious how far I can go with even a simple approach.

Also, I &lt;em&gt;am&lt;/em&gt; doing primarily screen-scraping to evaluate how well a controller sequence does.  What would be cheating would be giving it access to the game's internal memory and variables and anything else you as a human sitting in front of the TV don't have available to you.  (Plus, it'd be a nightmare from a usability standpoint -- just how is the user going to figure out where and how the score is stored?)</description>
		<content:encoded><![CDATA[<p>First off, I&#8217;m probably being sloppy with using the terms &#8220;genetic algorithms&#8221; and &#8220;genetic programming,&#8221; so try not to read too much into my word choice.</p>
<p>The basic approach I have in mind is to generate a bunch of random controller sequences, see which ones fare best, mutate/crossover/etc, and repeat.  I know there&#8217;s a lot of parameters and strategies to choose from in there, and I haven&#8217;t yet decided just how I&#8217;ll approach it.</p>
<p>Right now, my fitness functions are going to be pretty simple.  From a purely implementation point of view, it wouldn&#8217;t be hard to make it a lot more sophisticated.  However, I have no idea how to put a GUI in front of something like that without making it completely arcane.</p>
<p>Besides, I&#8217;m curious how far I can go with even a simple approach.</p>
<p>Also, I <em>am</em> doing primarily screen-scraping to evaluate how well a controller sequence does.  What would be cheating would be giving it access to the game&#8217;s internal memory and variables and anything else you as a human sitting in front of the TV don&#8217;t have available to you.  (Plus, it&#8217;d be a nightmare from a usability standpoint &#8212; just how is the user going to figure out where and how the score is stored?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: E Procter</title>
		<link>http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/#comment-959</link>
		<dc:creator>E Procter</dc:creator>
		<pubDate>Mon, 07 Aug 2006 19:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://web.ics.purdue.edu/~kuliniew/wp/archives/2006/08/01/time-trial/#comment-959</guid>
		<description>So I was thinking about it (what can I say it's a slow day at the office), with "it" being you're statement about it being "win" vs. "lose &lt;i&gt;n&lt;/i&gt; + 3 lives"...

Why not just make it "win" vs. "die"? I mean, sure, your'e restricting the project to finding a solution from a more restricted solution domain, but it would make defining the fitness function more manageable (I would think)...

I don't know... maybe not... just figured I'd ask "why not?"...</description>
		<content:encoded><![CDATA[<p>So I was thinking about it (what can I say it&#8217;s a slow day at the office), with &#8220;it&#8221; being you&#8217;re statement about it being &#8220;win&#8221; vs. &#8220;lose <i>n</i> + 3 lives&#8221;&#8230;</p>
<p>Why not just make it &#8220;win&#8221; vs. &#8220;die&#8221;? I mean, sure, your&#8217;e restricting the project to finding a solution from a more restricted solution domain, but it would make defining the fitness function more manageable (I would think)&#8230;</p>
<p>I don&#8217;t know&#8230; maybe not&#8230; just figured I&#8217;d ask &#8220;why not?&#8221;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: E Procter</title>
		<link>http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/#comment-958</link>
		<dc:creator>E Procter</dc:creator>
		<pubDate>Mon, 07 Aug 2006 18:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://web.ics.purdue.edu/~kuliniew/wp/archives/2006/08/01/time-trial/#comment-958</guid>
		<description>So are you waiting to determine your fitness function before beginning designing the program?  And in general, I get the impression that genetic algorithms are not going to be sufficient in this application given their fixed-length restrictions as opposed to genetic programming.  GP allows for more versatility and open domain searching, as well as better crossover results, even compared to cut/splice asymetrical crossover with algorithms.

There are many other things you might want to consider during implementation, that while not definatively necessary decrease the likelihood of getting stuck in local minima/maxima.  As an example, you might consider the use of automatically defined functions (with the only downside being the potential complication of crossover and mutation) or reinsertion (though here you need avoid problems with what Excel terms 'circular references'; not to mention the same crossover / mutation problems when nodes changes).  Also, there's some debate (since its completely up to the programmer) as to how to select individuals (one ranked based on fitness) for crossover / mutation / inclusion from generation to generation.  

Are you going to try to find a 'solution' for the entire game during a single run?  I would imagine that it would be more reasonable to break it into multiple (and independent) solutions for each 'level,' with recombination at the end.  This might also aid in the application of a fitness function.

Admittedly, I'm not sure the best way to determine the fitness function.  But could you be more specific on why you think screen-scraping (I admit I had to look up what that meant... where's my wikipedia link?!) would be 'cheating'?  Also, while it would include getting back into the code, could you not simply include 'markers' in each level to use, well, as markers (i.e. milestones) and include that in the fitness function?

Look at the bright side of this application.  Depending on how you look at it, either your function set or your terminal set is already provided (*cough* exclude start&#38;select for god's sake *cough*), and there doesn't appear to be much need for the other.  And at least your termination decision is easy, so you don't have to worry about generation limitations.

Are you going to try and analytically determine a sufficient population size, or are you just going to start with a fairly large yet arbitrary number?  Some 'experts' (or whatever you want to call them... writers at the least) think that the benefit of a large population diminishes as populations grow, though I haven't spent the time to see if anyone empiracally support any estimation as to when this occurs... theory bastards...

I look forward to when you write about progress with the program, even if it's only utilizing a temporary fitness function.  Get to work!

Koza would be intrigued I'm sure...

Addendum: both www.domoariga.to and www.mrrobo.to are available... yeah... i went there... i do have to say i'm a fan of capt. derivative... he's not cool unless he has postulates, though...</description>
		<content:encoded><![CDATA[<p>So are you waiting to determine your fitness function before beginning designing the program?  And in general, I get the impression that genetic algorithms are not going to be sufficient in this application given their fixed-length restrictions as opposed to genetic programming.  GP allows for more versatility and open domain searching, as well as better crossover results, even compared to cut/splice asymetrical crossover with algorithms.</p>
<p>There are many other things you might want to consider during implementation, that while not definatively necessary decrease the likelihood of getting stuck in local minima/maxima.  As an example, you might consider the use of automatically defined functions (with the only downside being the potential complication of crossover and mutation) or reinsertion (though here you need avoid problems with what Excel terms &#8216;circular references&#8217;; not to mention the same crossover / mutation problems when nodes changes).  Also, there&#8217;s some debate (since its completely up to the programmer) as to how to select individuals (one ranked based on fitness) for crossover / mutation / inclusion from generation to generation.  </p>
<p>Are you going to try to find a &#8217;solution&#8217; for the entire game during a single run?  I would imagine that it would be more reasonable to break it into multiple (and independent) solutions for each &#8216;level,&#8217; with recombination at the end.  This might also aid in the application of a fitness function.</p>
<p>Admittedly, I&#8217;m not sure the best way to determine the fitness function.  But could you be more specific on why you think screen-scraping (I admit I had to look up what that meant&#8230; where&#8217;s my wikipedia link?!) would be &#8216;cheating&#8217;?  Also, while it would include getting back into the code, could you not simply include &#8216;markers&#8217; in each level to use, well, as markers (i.e. milestones) and include that in the fitness function?</p>
<p>Look at the bright side of this application.  Depending on how you look at it, either your function set or your terminal set is already provided (*cough* exclude start&amp;select for god&#8217;s sake *cough*), and there doesn&#8217;t appear to be much need for the other.  And at least your termination decision is easy, so you don&#8217;t have to worry about generation limitations.</p>
<p>Are you going to try and analytically determine a sufficient population size, or are you just going to start with a fairly large yet arbitrary number?  Some &#8216;experts&#8217; (or whatever you want to call them&#8230; writers at the least) think that the benefit of a large population diminishes as populations grow, though I haven&#8217;t spent the time to see if anyone empiracally support any estimation as to when this occurs&#8230; theory bastards&#8230;</p>
<p>I look forward to when you write about progress with the program, even if it&#8217;s only utilizing a temporary fitness function.  Get to work!</p>
<p>Koza would be intrigued I&#8217;m sure&#8230;</p>
<p>Addendum: both <a href="http://www.domoariga.to" rel="nofollow"></a><a href='http://www.domoariga.to'>http://www.domoariga.to</a> and <a href="http://www.mrrobo.to" rel="nofollow"></a><a href='http://www.mrrobo.to'>http://www.mrrobo.to</a> are available&#8230; yeah&#8230; i went there&#8230; i do have to say i&#8217;m a fan of capt. derivative&#8230; he&#8217;s not cool unless he has postulates, though&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Kuliniewicz</title>
		<link>http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/#comment-956</link>
		<dc:creator>Paul Kuliniewicz</dc:creator>
		<pubDate>Wed, 02 Aug 2006 03:27:38 +0000</pubDate>
		<guid isPermaLink="false">http://web.ics.purdue.edu/~kuliniew/wp/archives/2006/08/01/time-trial/#comment-956</guid>
		<description>Short answer: This way is a lot easier to implement.

Long answer: You're right, my approach is more along the lines of the &lt;a href="http://en.wikipedia.org/wiki/Weasel_program"&gt;weasel program&lt;/a&gt;, although here there's not necessarily only one "ideal" solution, and even if there is, it certainly isn't known ahead of time.

Or, in other words, my approach is searching for a rote solution, whereas a strategy more in the spirit of true GA would be to find an algorithm or heuristic for choosing inputs in response to changing game state -- finding something that knows &lt;em&gt;how&lt;/em&gt; to play well, rather than stumbling across a series of moves that happens to work.

I'm really not even sure how you'd go about doing that.  What would the organisms look like?  Something like neural nets, I guess?  I'd definitely need to do some reading to even figure out where to begin with something like that.

I suppose the organism could also learn about the game state by screen-scraping, just like a human player does.  In theory you could point it to the emulator's internal state instead, but (a) that lets it cheat, and (b) that requires deciphering a lot more of FCEU's guts than I care to do.

Interestingly, though, I don't think this has any impact on how you define a fitness function!  The fitness function only really cares about the end result, not how you happen to get there.  My current implementation just watches whatever's playing, after all -- it doesn't care who's providing the controller inputs.

Now I have the urge to pit a population of rote-learners and a population of neural nets against each other, and see if one drives the other to extinction.  Curses, you just found a way to make this little project even more interesting!</description>
		<content:encoded><![CDATA[<p>Short answer: This way is a lot easier to implement.</p>
<p>Long answer: You&#8217;re right, my approach is more along the lines of the <a href="http://en.wikipedia.org/wiki/Weasel_program">weasel program</a>, although here there&#8217;s not necessarily only one &#8220;ideal&#8221; solution, and even if there is, it certainly isn&#8217;t known ahead of time.</p>
<p>Or, in other words, my approach is searching for a rote solution, whereas a strategy more in the spirit of true GA would be to find an algorithm or heuristic for choosing inputs in response to changing game state &#8212; finding something that knows <em>how</em> to play well, rather than stumbling across a series of moves that happens to work.</p>
<p>I&#8217;m really not even sure how you&#8217;d go about doing that.  What would the organisms look like?  Something like neural nets, I guess?  I&#8217;d definitely need to do some reading to even figure out where to begin with something like that.</p>
<p>I suppose the organism could also learn about the game state by screen-scraping, just like a human player does.  In theory you could point it to the emulator&#8217;s internal state instead, but (a) that lets it cheat, and (b) that requires deciphering a lot more of FCEU&#8217;s guts than I care to do.</p>
<p>Interestingly, though, I don&#8217;t think this has any impact on how you define a fitness function!  The fitness function only really cares about the end result, not how you happen to get there.  My current implementation just watches whatever&#8217;s playing, after all &#8212; it doesn&#8217;t care who&#8217;s providing the controller inputs.</p>
<p>Now I have the urge to pit a population of rote-learners and a population of neural nets against each other, and see if one drives the other to extinction.  Curses, you just found a way to make this little project even more interesting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fluffy</title>
		<link>http://www.kuliniewicz.org/blog/archives/2006/08/01/time-trial/#comment-955</link>
		<dc:creator>fluffy</dc:creator>
		<pubDate>Wed, 02 Aug 2006 03:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://web.ics.purdue.edu/~kuliniew/wp/archives/2006/08/01/time-trial/#comment-955</guid>
		<description>Rather than doing it as a linear progression of keystrokes (which isn't really that mappable to a GA in a very meaningful way), why not do something based on VRAM contents? like, the inputs could be sprite positions and CHR0 data.</description>
		<content:encoded><![CDATA[<p>Rather than doing it as a linear progression of keystrokes (which isn&#8217;t really that mappable to a GA in a very meaningful way), why not do something based on VRAM contents? like, the inputs could be sprite positions and CHR0 data.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
