<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3" -->
<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/"
	>

<channel>
	<title>Anthony M Harrison</title>
	<link>http://anthonymharrison.com</link>
	<description>Digital thoughts and cognitive computations</description>
	<pubDate>Sat, 05 Jul 2008 22:15:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
	<language>en</language>
			<item>
		<title>ECF experiences</title>
		<link>http://anthonymharrison.com/2008/07/05/ecf-experiences/</link>
		<comments>http://anthonymharrison.com/2008/07/05/ecf-experiences/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 22:15:41 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Errata]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/07/05/ecf-experiences/</guid>
		<description><![CDATA[Recently I finished (in so much as any software I develop is actually ever finished) a tool that allows bulk jACT-R model runs to be submitted to a remote server. All in all, it was an amazingly painless experience made possible by ECF, a protocol neutral communications library in the latest release of Eclipse. To [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I finished (in so much as any software I develop is actually ever finished) a tool that allows bulk jACT-R model runs to be submitted to a <a href="http://jactr.org/node/46">remote server</a>. All in all, it was an amazingly painless experience made possible by <a href="http://www.eclipse.org/ecf/">ECF</a>, a protocol neutral communications library in the latest release of <a href="http://www.eclipse.org/">Eclipse</a>. To be completely honest, while I&#8217;ve had dreams about this tool for a long time, it wasn&#8217;t until I saw the <a href="http://live.eclipse.org/node/323">webinar</a> for ECF that I realized just how feasible this project was.</p>
<p>What follows are my thoughts and impressions on using ECF. Before I begin, let me include this disclaimer: for all things networking, I am self-taught. And like all self-taught men, I had an idiot for a teacher. However, I do have a great deal of experience building networked tools for robotics, modeling and my own edification. Up until this point I have relied upon <a href="http://mina.apache.org/">MINA</a>, another slick networking framework - but one that sticks closer to more traditional networking models.</p>
<p>I&#8217;d like to start off with the positive points.</p>
<ul>
<li>The use of the <a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/core/IContainer.html">IContainer</a> and adapter paradigm makes it really quick to get started using the framework, particularly for those familiar with Eclipse.</li>
<li>The generic (and serializable) <a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/core/identity/ID.html">IDs</a> make the tracking of connections absurdly easy (e.g. I use them as map keys to keep track of processing jobs and the clients &amp; servers they are associated with across invocations of the IDE. Quit, start up again, and everything is right back the way it was).</li>
<li>The <a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/discovery/IDiscoveryContainerAdapter.html">discovery</a> api is incredibly simple. Having tried to use zeroconf years back, this is a dramatic improvement.</li>
<li><a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/filetransfer/IRetrieveFileTransferContainerAdapter.html">Retrieving files</a> via known standard protocols is also a snap (I use it to fetch the archives of the runs and results, with a dynamic Jetty instance to server them). From what I can tell, virtually all container instances support a configurable url file fetch mechanism (file:, http:, scp even).</li>
<li>The use of <a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/datashare/IChannelContainerAdapter.html">channels</a> makes arbitrary messaging (read as: serialized POJO) quick and painless, particularly since most containers support it with relatively little difficulty.</li>
</ul>
<p>Before I present my gripes, let me just say that the folks behind this project have done an awesome job. It took about a week to get this whole tool up and running. But there were some headaches, mostly due to documentation (availability, when it&#8217;s there it&#8217;s good) and mental model mismatches.</p>
<p style="font-size: 13px;"><strong>Clients as Servers</strong></p>
<p>If you want to build a server, you&#8217;ll probably look at the &#8220;ecf.generic.server&#8221; container, thinking that you&#8217;ll hook up to it some connection policies, channel handlers and be done with it. Not exactly. The ecf generic server acts as a hub. Your actual server will be a client that connects to the ecf server in order to talk to the actual clients that connect to it as well. I can understand the reasoning here, but this doesn&#8217;t map very cleanly onto most conceptions of a server. Looking through the developer mailing list, I see that I&#8217;m not the only one who&#8217;s gotten a bit confused.</p>
<p>This is magnified by how the generic server handles channel communications. When a client connects to it, it is assigned a unique ID, it will be up to you to determine which IDs correspond to the server-client and the clients-proper.</p>
<p>I am somewhat surprised that there is no IServerContainerAdapter that permits the setting of connection policies and the like. Something that more closely maps onto the traditional concept of a server. Something less general than the ecf generic server that can be extended into something very specific. As it stands, I don&#8217;t see a way to quickly build a server that non-ECF clients can access. (But I&#8217;m probably wrong).</p>
<p style="font-size: 13px;"><strong>Services</strong></p>
<p>I love them OSGi services, and ECF is supporting them as well. But I&#8217;ll be damned if I could find any of the <a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/filetransfer/service/package-frame.html">file sharing services</a>. I don&#8217;t know if it&#8217;s missing or I&#8217;m clueless, but I wasted a couple of hours looking for said services. Fortunately, they, like all good Eclipse citizens, include their source code. In there I discovered that most containers support the url file transfers right out of the gate. Doh!</p>
<p style="font-size: 13px;"><strong>Where are those container names?</strong></p>
<p><a href="http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/core/ContainerFactory.html">ContainerFactory.getDefault().createContainer(String)</a> is the most document method for creating a new container, yet finding the list of current container names can be a pain (short of PDE extension point search). There is a <a href="http://wiki.eclipse.org/ECF_Providers">providers list</a>, but it doesn&#8217;t include the names. After digging I finally found it on the eclipse <a href="http://www.eclipse.org/ecf/documentation.php">site proper</a>. Since the wiki is actually the first place the ECF project page on Eclipse.org directs you to, stumbling back to the eclipse site again seemed like the wrong path to me. I dunno. If it were me, it would be at the top of the providers list and maintained regularly (<em>&#8220;</em><span style="font-family: arial; font-size: 13px;"><em>ecf.generic.fileshare&#8221;</em> is apparently a vestigial remnant from earlier versions).</span></p>
<p>Anyway, as I mentioned, these are small gripes for what is an otherwise exceptional piece of work, particularly when you consider all the functionality that this is permitting. Good job, guys.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/07/05/ecf-experiences/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Escape from writing</title>
		<link>http://anthonymharrison.com/2008/06/19/escape-from-writing/</link>
		<comments>http://anthonymharrison.com/2008/06/19/escape-from-writing/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 17:41:26 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Big Ideas]]></category>

		<category><![CDATA[Cognitive Modeling]]></category>

		<category><![CDATA[jACT-R]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/06/19/escape-from-writing/</guid>
		<description><![CDATA[As usual after a day of writing, I needed to take a break. I decided to watch an old webinar on the Eclipse communications project. Why does a psychologist/roboticist care about a platform specific communications system? Aside from the possibilities of leveraging others work on shared editing, or even chat/IM within the IDE (great for [...]]]></description>
			<content:encoded><![CDATA[<p>As usual after a day of writing, I needed to take a break. I decided to watch an old <a href="http://live.eclipse.org/node/323">webinar</a> on the <a href="http://www.eclipse.org/ecf/">Eclipse communications project</a>. Why does a psychologist/roboticist care about a platform specific communications system? Aside from the possibilities of leveraging others work on <a href="http://codesurgeonblog.com/2008/06/cola-real-time-shared-editing.html">shared editing</a>, or even <a href="http://wiki.eclipse.org/Screen_Captures_over_IM">chat/IM</a> within the IDE (great for contacting me if you&#8217;ve got a question), it also opens the door to more effective distributed model execution.</p>
<p>As cognitive modelers we routinely have to run thousands of model iterations in order to collect enough data to do effective quantitative fits. For simple models, the time cost is negligible, but larger models can serious tax computation resources for quite sometime. My dissertation experiments lasted around two hours, and the model runs took almost 15 minutes per simulated subject. Given the parameter space I had to explore, it was common for my machine to be bogged down for days on end. My solution at the time was to VNC into other machines in the lab, update the model from SVN, then run a set of parameters. Not the most effective distribution mechanism.</p>
<p>Wouldn&#8217;t it be better if you could do all this from the IDE without any hassle? Imagine if you could specify the bulk model executions and then farm it out to a set of machines without any heavy lifting or sacrificing your processor cycles. The combination of OSGi bundles (which all <a href="http://jactr.org/" title="jACT-R">jACT-R</a> models are), <a href="http://wiki.eclipse.org/PDE">Eclipse&#8217;s PDE</a>, and ECF makes this possibility a very near reality (<a href="http://wiki.eclipse.org/Equinox_p2">p2</a> will definitely help too as it will make enforcing consistent bundle states much easier).</p>
<p>After watching the webinar I couldn&#8217;t resist and started building the pieces. Here&#8217;s how the bad-boy will work:</p>
<ol>
<li>define the <a href="http://jactr.org/node/7">run configuration</a> for the iterative model run</li>
<li>then select the remote tab which will list all the discovered service capable of accepting the model run (pruned based on dependencies of your model)</li>
<li>the model and all its dependencies is exported to a zip file and sent to the remote service</li>
<li>the remote service unpacks, imports and compiles the content (ensuring that all the deps are met and your code will actually run) - it then executes the run configuration</li>
<li>as the execution progresses, the service transmits the state information back to your IDE (i.e. iteration #, ETA, etc)</li>
<li>when all is done, it packages up the working directory that the model was run in and sends it back</li>
<li>this is then expanded into your runs/ directory as if you had executed the bulk run yourself.</li>
</ol>
<p>This is actually a sloppy implementation of a more general functionality that Eclipse might find useful: transmitting local bundles and invoking them on a remote system.</p>
<p>I&#8217;ve got a weekend away from distractions coming up and I think I can get a rough implementation working by then. This will certainly make the <a href="http://anthonymharrison.com/2008/02/14/it-lives/">bulk monkey runs</a> go so much easier (remote desktop is usable but really just too much of a hassle). Of course, I could use that time to work on the spatial modeling instead.. but that&#8217;s too much like real work for a weekend.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/06/19/escape-from-writing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Comms, packages, and slopes</title>
		<link>http://anthonymharrison.com/2008/05/23/comms-packages-and-slopes/</link>
		<comments>http://anthonymharrison.com/2008/05/23/comms-packages-and-slopes/#comments</comments>
		<pubDate>Fri, 23 May 2008 20:17:47 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Errata]]></category>

		<category><![CDATA[Robotics]]></category>

		<category><![CDATA[jACT-R]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/05/23/comms-packages-and-slopes/</guid>
		<description><![CDATA[It&#8217;s so nice to have a productive week, even if you didn&#8217;t get any of the things you needed to do done. The final dissertation error analyses have been hanging over my head like the sword of damocles. They need to be done so that I can generate a decent fit of the path-integration errors [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s so nice to have a productive week, even if you didn&#8217;t get any of the things you needed to do done. The final dissertation error analyses have been hanging over my head like the sword of damocles. They need to be done so that I can generate a decent fit of the path-integration errors for the models, but it&#8217;s soooooo boring.</p>
<p>Fortunately, a potential visit by the Discovery channel allowed me to redirect back to the robot. While making sure the monkey models still ran, I slipped in a quick communications test. I&#8217;ve been arguing since I got here that the synchronous, polling communications that we use to communicate with the robot and the various sensor processors was hideously inefficient. Understandably there was reluctance to go down the route of a communications retrofit. Most didn&#8217;t think it was a significant bottleneck, particularly since Lisp and Java are controlling the cognition (stereotyped views of the languages&#8217; performance). I wasn&#8217;t sure how much time we were wasting, but a back of the envelope calculation convinced me that we could get at least a 30-50% improvement by going with a push model. So, while verifying the robot, I ran some networking benchmarks. It was worse than I&#8217;d thought. Much worse.</p>
<p>The maximum update rate I was able to achieve was around 2Hz. Single message transactions were taking well over 100ms, and each full update was taking an average of 5 transactions. I couldn&#8217;t believe it, so I double checked and triple checked. When I showed the numbers to our vision guy, he couldn&#8217;t believe it either. Fortunately, he had a mock client of his own. Sure enough, 2.5Hz. We agreed to work on a new scheme and test it out on his face tracker. The initial mock up is a subscription based, UDP mechanism where the client requests that data be delivered at a specific (and adaptable) rate. My tests have the system running in the kHz range with little system or network impact (small packets). Once the face tracker is ready, I think we&#8217;ll have enough evidence to merit a communications refit, finally allowing the robots perceptual systems to run at a more human rate of around 20Hz. There&#8217;s only one problem, Lisp doesn&#8217;t support UDP, but there is <a href="http://cl-net-snmp.svn.sourceforge.net/">hope</a>.</p>
<p>While I was verifying the model on the robot I was reminded of another concern I&#8217;d had. When we run demos, a significant amount of time is spent figuring out what has changed since the last time the demo worked. Software changes, as do the models. What we needed was a way to archive verified models and their dependencies. Lisp can generate self-contained executables (which we don&#8217;t seem to use too often).. and Eclipse certainly <a href="http://wiki.eclipse.org/FAQ_How_do_I_create_an_Eclipse_product%3F">supports the same</a> on the Java side. So I spent a day reverse engineering how Eclipse does it (a multi-step process that would be unrealistic to expect psychologists to deal with), simplified and customized for jACT-R models. It is now possible to <a href="http://jactr.org/node/42">export an executable model</a>, its configuration and all dependencies as a single entity, making safe and repeatable demos that much more possible (knock on wood).</p>
<p>After that was completed I had one of those &#8220;A-ha!&#8221; moments. For a week or so I&#8217;ve been brainstorming on how to get jACT-R to perform a visual search along a line (to support gaze-following). I had actually implemented a few years ago, but that code had long since vanished (CVS-&gt;SVN migration). Sort candidate visual objects based on their distance from the line.. duh. I hate it when solutions are obvious and I&#8217;m just oblivious to them. Que sera. The code necessary to support this is actually extremely simple and should require only a minimum of fussing. Once that face tracker is up and running, we should be able to do some fairly plausible gaze-following.</p>
<p>Now if I could only muster the motivation to finish up those error analyses.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/05/23/comms-packages-and-slopes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Who&#8217;s a great big idiot?</title>
		<link>http://anthonymharrison.com/2008/05/06/whos-a-great-big-idiot/</link>
		<comments>http://anthonymharrison.com/2008/05/06/whos-a-great-big-idiot/#comments</comments>
		<pubDate>Tue, 06 May 2008 19:23:05 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Errata]]></category>

		<category><![CDATA[Robotics]]></category>

		<category><![CDATA[jACT-R]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/05/06/whos-a-great-big-idiot/</guid>
		<description><![CDATA[I am. I am.
Surprise, surprise, my previous rant was completely unjustified. Turns out it was my own stupid fault. I was programmatically launching player, unfortunately I forgot to harvest the program&#8217;s stdout and stderr. The process&#8217;s buffers were flooded. Stooopid Ediot!
But, at least the monkey sims can run for much longer now. And not a [...]]]></description>
			<content:encoded><![CDATA[<p>I am. I am.</p>
<p>Surprise, surprise, my previous rant was completely unjustified. Turns out it was my own stupid fault. I was programmatically launching player, unfortunately I forgot to harvest the program&#8217;s stdout and stderr. The process&#8217;s buffers were flooded. Stooopid Ediot!</p>
<p>But, at least the monkey sims can run for much longer now. And not a moment too soon as the robot lab is rapidly filling with interns. (It&#8217;s such a nice change of pace to no longer be on the bottom of the totem pole)</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/05/06/whos-a-great-big-idiot/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frackin&#8217; other peoples&#8217; code *</title>
		<link>http://anthonymharrison.com/2008/05/05/frackin-open-source/</link>
		<comments>http://anthonymharrison.com/2008/05/05/frackin-open-source/#comments</comments>
		<pubDate>Mon, 05 May 2008 19:59:59 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Errata]]></category>

		<category><![CDATA[Robotics]]></category>

		<category><![CDATA[jACT-R]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/05/05/frackin-open-source/</guid>
		<description><![CDATA[I love division of labor, it saves us all from having to reinvent the wheel.. but sometimes it just drives me insane.
I&#8217;ve hooked up player/stage through a java client, enabling jACT-R (and the monkey models) to interact in the simulated robotic environment. For sometime now I&#8217;ve had a bug where stage would freeze after around [...]]]></description>
			<content:encoded><![CDATA[<p>I love division of labor, it saves us all from having to reinvent the wheel.. but sometimes it just drives me insane.</p>
<p>I&#8217;ve hooked up <a href="http://playerstage.sourceforge.net/" title="PlayerStage">player/stage</a> through a <a href="http://java-player.sourceforge.net/">java client,</a> enabling <a href="http://jactr.org/" title="jACT-R">jACT-R</a> (and the monkey models) to interact in the simulated robotic environment. For sometime now I&#8217;ve had a bug where stage would freeze after around four minutes of simulated time. I initially thought it was due to my unorthodox use of the client (the threading model in the client is a tad weak), so I reverted it back to the normal usage and the simulations were now running past four minutes with no problem. Yay, problem fixed!</p>
<p>Nope. Now it dead locks around 6 minutes. So maybe it&#8217;s a problem with stage? Lo and behold, someone else was encountering a <a href="http://www.nabble.com/Re%3A-request%2C-reg%3A-non-trivial-problem-tt11237170.html#a11241196">similar problem</a>. The recommended fix? Upgrade to playerstage 2.1, which is, of course, not support by the client yet and no one has posted any word on an ETA.</p>
<p>I am able to detect when it occurs, which lead me to believe that I&#8217;d be able to disconnect the clients and reconnect. Unfortunately, the only way to resurrect stage at this point is to completely kill the socket owning process. My only option is to not only disconnect the clients, but then force quit stage and restart it.. Ick!</p>
<p>I think it&#8217;s time to work on something else for a little while.</p>
<p>* This is not meant as a disparagement of anyone&#8217;s work, rather just me venting. I fully acknowledge that the same statements could be- (and probably have been-) applied to my own work.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/05/05/frackin-open-source/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Eating one&#8217;s own dog food</title>
		<link>http://anthonymharrison.com/2008/04/16/eating-ones-own-dog-food/</link>
		<comments>http://anthonymharrison.com/2008/04/16/eating-ones-own-dog-food/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 21:03:02 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Errata]]></category>

		<category><![CDATA[jACT-R]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/04/16/eating-ones-own-dog-food/</guid>
		<description><![CDATA[After finally getting the movement tolerances working the jACT-R so that the robo-monkeys could finally see each other as they move around, I came upon a motor bug. Actually, I&#8217;m still trying to hunt down the exact circumstances under which it occurs. It&#8217;s particularly challenging because it involves the interaction of the robot/simulation sending a [...]]]></description>
			<content:encoded><![CDATA[<p>After finally getting the <a href="http://anthonymharrison.com/2008/04/09/tired-of-movement-tolerances/">movement tolerances</a> working the <a href="http://jactr.org/" title="jACT-R">jACT-R</a> so that the robo-monkeys could finally see each other as they move around, I came upon a motor bug. Actually, I&#8217;m still trying to hunt down the exact circumstances under which it occurs. It&#8217;s particularly challenging because it involves the interaction of the robot/simulation sending a movement status and colliding with the model&#8217;s desire for things to complete in a predictable amount of time.</p>
<p>Since this bug is so hard to track down given the current tools, I decided it was about time to implement a long desired feature. In my experience, and the reports of others supports that, most of us just run the models and when something goes wrong we dig through the trace. Only as a last resort do we ever really step into the models. (Basically, all that work I did to integrate break-points and a <a href="http://jactr.org/node/7">debugger</a> were for naught <img src='http://anthonymharrison.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p style="text-align: left;">However, once we&#8217;ve found where something went wrong we immediately want to know what fired (easy enough from the trace) and what the state and contents of the buffers were (not so easy). The log view jACT-R has provided is good, but not great. The tabular format and filters makes it easier to ignore irrelevant info, but you still don&#8217;t get a clear picture of the buffer contents. To rectify this I&#8217;ve added the ability to dynamically modify the tooltip for the log viewer. Combined with the <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/buffer/event/IActivationBufferListener.html">buffer event listener</a> and the <a href="http://jactr.org/javadoc/org.jactr.tools/org/jactr/tools/tracer/RuntimeTracer.html">runtime tracer</a>, the log view can now display the full contents of any buffer as well as its flag values both before and after conflict resolution.</p>
<p style="text-align: justify;"><a href="http://anthonymharrison.com/wp/wp-content/uploads/2008/04/tooltip.jpg"><img src="http://anthonymharrison.com/wp/wp-content/uploads/2008/04/tooltip-tm.jpg" width="147" height="100" alt="Buffer content tooltip" /></a></p>
<p style="text-align: left;">The buttons on the tooltip allow you to toggle between seeing the buffer contents before and after conflict resolution. It&#8217;s not completely correct right now in two regards: some state information may be lost at the start and end of a run (i.e. your model starts with buffers pre-stuffed or the runtime terminates before sending the last bits of info), and the changes to the chunks while in the buffer are not being tracked. The first issue I don&#8217;t care about, but the second will be addressed soon.</p>
<p style="text-align: left;">This added information does carry with it a moderate performance penalty so I&#8217;ll be including it as a runtime configuration option. A little later I will also add tooltip information for the declarative (i.e. visualization of encoded chunks) and procedural (i.e. fired production and resolved instantiation, encoded productions) module traces.</p>
<p style="text-align: left;">But for now, I&#8217;m quite happy and this is making tracking down that spurious motor.state=error soooo much easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/04/16/eating-ones-own-dog-food/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Distributed memory in ACT-R</title>
		<link>http://anthonymharrison.com/2008/04/09/distributed-memory-in-act-r/</link>
		<comments>http://anthonymharrison.com/2008/04/09/distributed-memory-in-act-r/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 19:30:22 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Big Ideas]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/04/09/distributed-memory-in-act-r/</guid>
		<description><![CDATA[First off, I&#8217;m not talking distributed representations, no, this is entirely about implementation.
While the community is still some ways off from needing something like this, in the future many of us will be running models across much longer time-spans, both simulated and real. These models are going to seriously tax the underlying implementations. Currently jACT-R [...]]]></description>
			<content:encoded><![CDATA[<p>First off, I&#8217;m not talking distributed representations, no, this is entirely about implementation.</p>
<p>While the community is still some ways off from needing something like this, in the future many of us will be running models across much longer time-spans, both simulated and real. These models are going to seriously tax the underlying implementations. Currently jACT-R has no problems with chunk counts in the hundreds of thousands, but millions? And what about productions? Most hand-coded models don&#8217;t exceed a few dozen productions, but with production compilation enabled for a long period in dynamic environments, it&#8217;s easy to envision scenarios where the production counts will be on par with the chunks.</p>
<p>This scenario is rapidly approaching for us working with robots operating over anything but the most trivial time scales.</p>
<p>The big information companies out there manage this volume of information easily with existing database systems. Why should the ACT-R implementations have to manage their own information searches, linkages and retrievals when there are specially tailored systems that can do it so much better?</p>
<p>Imagine if all chunks, types and productions were backed by something like <a href="http://mysql.com/">MySQL</a>. ACT-R could be freed to maintain only the most active subset of procedural and declarative memory, while less active information would be managed by the database. This scenario carries with it a slew of useful benefits.</p>
<p style="font-size: 13px;"><strong>Scalability</strong></p>
<p>The most obvious benefit of database backing would be in scalability. Database systems are designed to handle data quantities well beyond what we have attempted to this point, but quantities that are certainly within the realm of those required by long running models. By limiting ACT-R to only the immediately relevant information set, the architecture would require significantly fewer resources that could be better leveraged elsewhere.</p>
<p>This information subset could be intelligently managed using information we already have available. As the chunks in a buffer are changed, relevant chunks could be prefetched by following the associative links. The declarative subset would effectively be managed through the activation levels. Similarly, productions could be prefetched based on the chunktypes of the chunks currently in declarative memory. As the chunks and productions are deemed to be no longer relevant, they can be committed back to the database system (if changed) or discarded outright.</p>
<p style="font-size: 13px;"><strong>Persistence</strong></p>
<p>Obviously, anything stored in a database is persisted. This gives us the ability to created bootstrapped models. I can&#8217;t count the number of times I&#8217;ve heard researchers wish they could have preexisting models of some user group. This scheme would allow us to have specific databases of different population types and knowledge. With access restrictions, we could even set up domain specific databases (i.e. mathematics knowledge) and constrain what any connected model could access (i.e. up to and including algebra education). This applies to declarative and procedural knowledge equally.</p>
<p>With some neat use of caching database systems, you could set up a centralized immutable system with a common knowledge base, accessed by each lab&#8217;s local database system which is accessed by all the researchers, who themselves have a local system running with write privileges for their respective models. Similarly, there is no reason that any one model would be tied to only one database system. Need a model of a high-school senior who plays video games? Point the model to an aggregating database that provides access to separate high-school level knowledge bases and then point it to a video game specific database.</p>
<p style="font-size: 13px;"><strong>Performance</strong></p>
<p>Much of the scalability benefits are directly relevant to performance. What&#8217;s really nice about having multiple database systems is that the architecture could make multiple simultaneous search requests to all the databases and harvest the first result. With network latencies decreasing every year, it&#8217;s not unreasonable to expect that infrequently used information would still be accessible faster than realtime.</p>
<p style="font-size: 13px;"><strong>But how?</strong></p>
<p>I can&#8217;t speak towards how one would implement such a scheme in Lisp. The <a href="http://common-lisp.net/~dlw/LispSurvey.html">lack of real threading</a> across most implementations makes this a challenge. In jACT-R this would be <span style="font-style: italic;">relatively</span> simple (it&#8217;s still one heck of an undertaking).</p>
<p>For maximum performance you&#8217;d want the system to engage in asynchronous management of the relevant information subset. Fortunately, both the <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/module/procedural/IProceduralModule.html">procedural</a> and <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/module/declarative/IDeclarativeModule.html">declarative</a> modules already support asynchronous modes of operation. Each would attach <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/buffer/event/IActivationBufferListener.html">listeners</a> to the <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/buffer/IActivationBuffer.html">buffers</a> (for chunk additions and removals) as well as to the <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/chunk/event/IChunkListener.html">chunks</a> in the buffers (to catch any changes). All the chunks <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/chunk/four/Link.html">associated</a> with these active chunks could then be prefetched. Similarly, their <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/chunktype/IChunkType.html">chunk-types</a> would be used to prefetch the <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/production/IProduction.html">productions</a> that depend upon those chunk-types.</p>
<p>Since all major entities (types, chunks, productions) are represented as handles, the system can create and return these handles before the contents have been fully received and recreated from the databases. This allows the architecture to work with the chunks and productions before they are actually available, further exploiting the asynchronies. (Obviously, if the chunk or production&#8217;s contents need to be accessed, the system will block until that data is available).</p>
<p>While this prefetch mechanism would work well for information directly connected (through some depth), it doesn&#8217;t address the retrieval of information specified at runtime by productions. Fortunately, the <a href="http://jactr.org/javadoc/org.jactr/org/jactr/core/module/retrieval/IRetrievalModule.html">retrieval</a> module relies upon the synchrony of the declarative module. It would merely make a request from the database and immediately return a handle to a chunk. If no result is received within a specified window of time (or an empty response returned), the declarative module would just redirect the handle to point to the standard error chunk.</p>
<p>As chunks and productions become irrelevant, they can be checked for any parameter changes. Any changes can then be sent back to the database for persistence. Newly created chunks would be handled in the same way, only committing when the chunk is deemed to be contextually irrelevant. Fortunately, Java already supports a mechanism to keep track of object <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/package-frame.html">references</a>, so other modules would still be able to prefetch information and retain it indefinitely without fear of it being reclaimed.</p>
<p>jACT-R already has a simple format that is easily persisted and searched in databases, and is already used to transmit information in an agnostic manner across the network: the <a href="http://en.wikipedia.org/wiki/Abstract_syntax_tree">AST</a>s used to bi-directionally translate between source and model.</p>
<p>In theory, all of this could be accomplished by extending the default implementations of the declarative and procedural modules, with custom implementations of the chunk, type and production handles (to notify the modules when they are no longer relevant).</p>
<p>Will this idea ever see the light of day? I sure as hell hope so. Is it anywhere on my horizon? Nope. Little old me still needs to bump up the pub count.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/04/09/distributed-memory-in-act-r/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tired of movement tolerances.</title>
		<link>http://anthonymharrison.com/2008/04/09/tired-of-movement-tolerances/</link>
		<comments>http://anthonymharrison.com/2008/04/09/tired-of-movement-tolerances/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 18:21:32 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Big Ideas]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/04/09/tired-of-movement-tolerances/</guid>
		<description><![CDATA[For the past few days I&#8217;ve been working on implementing the movement tolerance handling in the visual system (and aural, configural, manipulative), and I&#8217;m really tired of it right now. It was supposed to have been easier than this (hell, it should have been done last week) - but it ultimately required some significant refactoring [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few days I&#8217;ve been working on implementing the movement tolerance handling in the visual system (and aural, configural, manipulative), and I&#8217;m really tired of it right now. It was supposed to have been easier than this (hell, it should have been done last week) - but it ultimately required some significant refactoring of the asynchronous caching of afferent chunk encodings. Total headache.</p>
<p>Now as I&#8217;m getting to the final tidbits, I&#8217;m incredibly bored with it. Add to that the fact that I prefer my code to be readable, twice now I&#8217;ve refactored what I&#8217;ve already done. It will be done this week..</p>
<p>..but for a distraction, I&#8217;ve added a new category to document some of the crazy cool ideas I&#8217;ve been playing with in the back of my head. There are some that I converse with who believe these ideas should be held close to the chest until I can get prototypes assembled, but I&#8217;d rather throw them out there, see if they have any resonance with folks and to get some additional feedback.</p>
<p>Without further <a href="http://anthonymharrison.com/2008/04/09/distributed-memory-in-act-r/">ado</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/04/09/tired-of-movement-tolerances/feed/</wfw:commentRss>
		</item>
		<item>
		<title>At last..</title>
		<link>http://anthonymharrison.com/2008/03/27/at-last/</link>
		<comments>http://anthonymharrison.com/2008/03/27/at-last/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 22:11:22 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[jACT-R]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/03/27/at-last/</guid>
		<description><![CDATA[It took longer than expected (what doesn&#8217;t?), but the update to MINA 2 has been completed. MINA provides the underlying communications infrastructure between jACT-R and CommonReality (which provides the simulation brokering). The previous version had an out-of-order bug that took me forever to track down. I figured it was my code and my liberal use [...]]]></description>
			<content:encoded><![CDATA[<p>It took longer than expected (what doesn&#8217;t?), but the update to <a href="http://mina.apache.org/">MINA 2</a> has been completed. MINA provides the underlying communications infrastructure between <a href="http://jactr.org/">jACT-R</a> and CommonReality (which provides the simulation brokering). The previous version had an out-of-order bug that took me forever to track down. I figured it was my code and my liberal use of threads, but it turned out to be a MINA issue. Fortunately, the 2.0 release (M2) has a more consistent threading model that functions much better.</p>
<p>While initial runs showed that it actually ran slower, subsequent runs have revealed that was due to the short duration of those early tests. Long term executions, such as my handedness model, are hovering around the original performance numbers (~ 50-70x realtime). No complaints from me.</p>
<p>The update required significant rejiggering of the state and connection management which should now allow participants to come in and out at anytime during the simulation (assuming none is the <a href="http://jactr.org/node/21">exclusive owner of a clock</a>). I can now return to examining some model fits, further monkey refinements, perhaps get my dissertation into a publishable form? Craziness.</p>
<p>The next stage in the monkey modeling will incorporate some new features we&#8217;ve been playing with at the lab: gaze following. Aside from being relevant to developmentalists, gaze following presents a useful and cheap perspective-taking surrogate in the absence of more advanced processing. From my current meta-cogitating perspective, this also provides a useful starting point for goal inferencing.</p>
<p>But before I do that.. I really need to fix the movement tolerances in the visual system..</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/03/27/at-last/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Big deadline past, HRI around the corner.</title>
		<link>http://anthonymharrison.com/2008/03/05/big-deadline-past-hri-around-the-corner/</link>
		<comments>http://anthonymharrison.com/2008/03/05/big-deadline-past-hri-around-the-corner/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 19:20:42 +0000</pubDate>
		<dc:creator>tony</dc:creator>
		
		<category><![CDATA[Cognitive Modeling]]></category>

		<category><![CDATA[Robotics]]></category>

		<category><![CDATA[jACT-R]]></category>

		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://anthonymharrison.com/2008/03/05/big-deadline-past-hri-around-the-corner/</guid>
		<description><![CDATA[Last week marked the first major deadline that I&#8217;ve had here at NRL. The boss man was presenting our work at a social cognition workshop that was populated by cognitive and developmental psychologists plus some roboticists. From his report, it was an interesting interchange.
Our push leading up to it were some model fits of the [...]]]></description>
			<content:encoded><![CDATA[<p>Last week marked the first major deadline that I&#8217;ve had here at NRL. The boss man was presenting our work at a social cognition workshop that was populated by cognitive and developmental psychologists plus some roboticists. From his report, it was an interesting interchange.</p>
<p>Our push leading up to it were some model fits of the <a href="http://anthonymharrison.com/2008/02/14/it-lives/">monkey models</a> plus demos of the robot running the models. The fits didn&#8217;t happen (bug in common reality that I&#8217;m working on currently), but the movies did (and should be <a href="http://www.nrl.navy.mil/aic/iss/aas/CognitiveRobots.php">posted soon</a>). The final push towards the deadline has highlighted a few architectural divergences between jACT-R and ACT-R proper that I need to address. Those differences that are clearly mistakes will be patched, but those that are architectural decisions will likely be parameterized.</p>
<p>The post-workshop debriefing has produced some interesting discussions around here regarding the nature of theory of mind and meta-cognition more generally. Some of my early brain-storming regarding <a href="http://anthonymharrison.com/2007/12/13/general-concurrent-verbal-protocols/">concurrent protocols</a> seems like it really will set the stage for a general meta-cognitive capacity. Production compilation, threaded cognition, and a carefully designed declarative task description can get us <strong>really</strong> close to this goal. However, I suspect there are two pieces that need to be developed: variablized slot names and the ability to incrementally assemble a chunk specification (i.e. module request). I throw out this tantalizing bit with the promise that I will post a very lengthy consideration of this issue in the immediate future (I need to put together the pieces that currently exist and see how it plays out).</p>
<p>My insomnia development of the production static analyzer and visualizer is coming along nicely. Below are two screenshots from the analysis of the handedness model (which uses perspective taking to figure out which hand another person is holding up). The first shows all the positively related productions and their directions (i.e. which production can possibly follow which), with the selected production in yellow and its possible predecessors in blue and successors in green. The icons in the top-right corner show the filters for showing all, sequence, previous and next productions, plus positive, negative and ambiguous relationships. There are also configurations for layouts and zoom levels. Double clicking the production will switch the view to sequence which filters out all the other productions that are not directly related to the focus, across a configurable depth (1 currently).</p>
<div style="text-align: justify;">
  <a href="http://anthonymharrison.com/wp/wp-content/uploads/2008/03/all.jpg"><img src="http://anthonymharrison.com/wp/wp-content/uploads/2008/03/all-tm.jpg" width="125" height="100" alt="All productions visualized" /></a> <a href="http://anthonymharrison.com/wp/wp-content/uploads/2008/03/focus.jpg"><img src="http://anthonymharrison.com/wp/wp-content/uploads/2008/03/focus-tm.jpg" width="125" height="100" alt="Focus on the selected" /></a>
</div>
<p>I&#8217;m still not handling chunktype relationships, and I also need to provide buffer+chunktype transformations (i.e. +visual&gt; isa move-attention doesn&#8217;t place a move-attention into the visual buffer, but a visual-object instead). Once those are in place, I&#8217;ll add a chunktype filter to the visualizer so that you can focus on all productions that depend upon a specific chunktype, which will help really complex models (the monkey model, with all of its contingency and error handling is around 90 productions, all nicely layered by hierarchical goals, but that&#8217;s still a boat load of productions to have to visualize at once)</p>
<p>I&#8217;m hoping to get a bunch of this menial development and fixes done on the flight to/fro Amsterdam for <a href="http://hri2008.org/">HRI</a>. If all goes well, there should be a groovy new release in two weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthonymharrison.com/2008/03/05/big-deadline-past-hri-around-the-corner/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
