<?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>Neural Network Design blog &#187; N²D</title>
	<atom:link href="http://janbogaerts.name/index.php/tag/nnd/feed/" rel="self" type="application/rss+xml" />
	<link>http://janbogaerts.name</link>
	<description>My take on neural networks, AI and more</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:21:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Debugging networks: split paths</title>
		<link>http://janbogaerts.name/index.php/2010/03/04/debugging-networks-split-paths/</link>
		<comments>http://janbogaerts.name/index.php/2010/03/04/debugging-networks-split-paths/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 16:54:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Getting started]]></category>
		<category><![CDATA[N²D]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://janbogaerts.name/index.php/2010/03/04/debugging-networks-split-paths/</guid>
		<description><![CDATA[ An annoying side effect of this type of resonating network, is, when you have a bug in the code, you generally don’t get 0 answers, but a whole lot. This can sometimes be very confusing to debug. Why does a certain path give a positive result, when it shouldn’t? And more importantly (from NND’s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://janbogaerts.name/wp-content/uploads/2010/03/image4.png"><img style="border-right-width: 0px; margin: 0px 0px 0px 5px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="right" src="http://janbogaerts.name/wp-content/uploads/2010/03/image_thumb4.png" width="362" height="323" /></a> An annoying side effect of this type of resonating network, is, when you have a bug in the code, you generally don’t get 0 answers, but a whole lot. This can sometimes be very confusing to debug. Why does a certain path give a positive result, when it shouldn’t? And more importantly (from NND’s point of view at least), how can you follow the construction of that specific result, without the clutter of all the other processors? Enter ‘<em>split paths</em>’. </p>
<p><em><font color="#808080">A split path represent the route that a result took, from start to now, expressed in the neurons that the path chose during all the splits. </font></em></p>
<p>As example, if only 1 split was executed to get to a result, and there were 2 neurons in that split, the path of the result only has 1 node and can have 2 possible values, those that were used in the split. In the real world though, a path usually has many, many nodes.</p>
<p>To record a split path, you first need to put a break point at a position where you know you will get many invalid results. That’s because a split path can only be recorded when the processors are still running, not when the result has already been calculated. </p>
<p><a href="http://janbogaerts.name/wp-content/uploads/2010/03/image6.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://janbogaerts.name/wp-content/uploads/2010/03/image_thumb6.png" width="400" height="246" /></a>In the aici demo, it’s best to put a breakpoint in the ‘<em>Stage 1.1</em>’ code, in the if, second part (GetClusterMeaning(CurrentTo) == flow), if you drill down a bit further, you get the ‘Add split result’ instruction, which is basically the end point of the flow recognition&#160; algorithm. (see picture below).</p>
<p><em><font color="#808080">Put breakpoints on ‘Add split result’ instructions to find </font></em><em><font color="#808080">invalid split paths.</font></em></p>
<p>Once you have a processor that is producing an invalid result at your breakpoint, you can store the split path. Select the processor, open the context menu (right mouse button on a processor in the debugger overview) and select ‘<em>Store split path</em>’.&#160; This will produce a new entry in the tree on the ‘<em>Debugger</em>’ page (see 3th image). The root item will be ‘path for x’ where x is the name of the processor. The children are all the neurons that were selected for the path during a split instruction.</p>
<p>I usually kill everything after I have the path, the other processors will produce invalid results anyway, and you need to start a new run before it’s&#160; possible to actually use the path anyway. <a href="http://janbogaerts.name/wp-content/uploads/2010/03/image2.png"><img style="border-right-width: 0px; margin: 0px 0px 5px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="right" src="http://janbogaerts.name/wp-content/uploads/2010/03/image_thumb2.png" width="383" height="91" /></a></p>
<p><a href="http://janbogaerts.name/wp-content/uploads/2010/03/image5.png"><img style="border-bottom: 0px; border-left: 0px; margin: 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://janbogaerts.name/wp-content/uploads/2010/03/image_thumb5.png" width="294" height="310" /></a>So, finally we can start using the data to debug our network. The basic idea is to&#160; use the path for finding the processors that are following the specified path, so we can take a closer look at the code. In short, a split path provide a shortcut: instead of manually stepping through all the code and individually deciding which processors to follow, we can jump to the ones we are interested in. These will be highlighted in green and will pause when they have reached a split that is selected in the path. Off course, we first need to select the path in the debugger, and at least 1 child node, otherwise there wont be anything to see. </p>
<p>&#160;<em><font color="#808080">Processors that follow a selected split path will show up in green and pause whenever they reach a split that produces a neuron which is selected in the path.</font></em></p>
<p><a href="http://janbogaerts.name/wp-content/uploads/2010/03/image2.png"></a></p>
<p><a href="http://janbogaerts.name/wp-content/uploads/2010/03/image2.png">&#160;</a>One last note perhaps, once you have the processor you want, you can use the ‘Kill all but this’ command to stop all the other processors. This way there is less distraction in the debugger.</p>
]]></content:encoded>
			<wfw:commentRss>http://janbogaerts.name/index.php/2010/03/04/debugging-networks-split-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On resonance</title>
		<link>http://janbogaerts.name/index.php/2010/02/22/on-resonance/</link>
		<comments>http://janbogaerts.name/index.php/2010/02/22/on-resonance/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:10:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Getting started]]></category>
		<category><![CDATA[N²D]]></category>
		<category><![CDATA[resonance]]></category>

		<guid isPermaLink="false">http://janbogaerts.name/index.php/2010/02/22/on-resonance/</guid>
		<description><![CDATA[Just a small mental burp, while this thesaurus is (still) loading.
In case you are looking for a mental image to visualize this whole concept, try this: Resonance. When a link gets activated (for instance, the one to the very first neuron), it creates a resonance that triggers one or more other neurons. This excitation in [...]]]></description>
			<content:encoded><![CDATA[<p><em>Just a small mental burp, while this thesaurus is (still) loading.</em></p>
<p>In case you are looking for a mental image to visualize this whole concept, try this: <strong>Resonance. </strong>When a link gets activated (for instance, the one to the very first neuron), it creates a resonance that triggers one or more other neurons. This excitation in turn can cause another link between 2 neurons to be activated, causing more resonance and so and and on until the whole thing settles down.</p>
<p>I have absolutely no prove or idea that this is how it works in the real world, that’s just how my model can be interpreted. Truth be told, this is not how I conceived the thing (aka lets try to create a model that uses resonance), it was rather more like: I have 2 neurons, they are linked, how can I make something happen? Well, I can attach some code to the link and execute that. Cool. But, wait a moment, that looks like resonance…</p>
<p><em>and we just passed ‘culminate’, pfff</em></p>
]]></content:encoded>
			<wfw:commentRss>http://janbogaerts.name/index.php/2010/02/22/on-resonance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NND 0.3</title>
		<link>http://janbogaerts.name/index.php/2010/01/20/nnd-0-3/</link>
		<comments>http://janbogaerts.name/index.php/2010/01/20/nnd-0-3/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 19:16:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[N²D]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[0.3]]></category>

		<guid isPermaLink="false">http://janbogaerts.name/index.php/2010/01/20/nnd-0-3/</guid>
		<description><![CDATA[ The new release is finally ready.&#160; The Aici demo took a bit longer than planned. Also, lots of things have been fixed and updated. Here’s a non exhaustive list:

There’s a complete new lockmanager running in the background. This is much more secure (thread-wise, that is) and a lot faster. It’s still a bit of [...]]]></description>
			<content:encoded><![CDATA[<p> The new release is finally ready.&#160; The Aici demo took a bit longer than planned. Also, lots of things have been fixed and updated. Here’s a non exhaustive list:</p>
<ul>
<li><a href="http://janbogaerts.name/wp-content/uploads/2010/01/image1.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 20px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://janbogaerts.name/wp-content/uploads/2010/01/image_thumb1.png" width="207" height="296" /></a>There’s a complete new lockmanager running in the background. This is much more secure (thread-wise, that is) and a lot faster. It’s still a bit of a diesel though, it takes some time for it to get going, but once running, it should be pretty fast. The slow start is due to the storage mechanism (all xml files currently). This is the major drag on the entire system at the moment, and will be fixed next.</li>
<li><a href="http://www.ebswift.com/OpenSource/WordNetSQLServer/" target="_blank">Wordnet</a> import has been seriously updated, a lot more info is retrieved, and it’s now also possible to import the entire db in one go (although not yet advisable, due to a memory bug in the designer, it still takes a major byte out of the hard disk and it simply takes ridiculously long).</li>
<li>The thesaurus has been given a make over to allow for editing and filtering. He can now also display / edit non recursive relationships. Drag drop is also supported.</li>
<li> The frame editor has been updated considerably: drag drop support has been added and frame element filters/restrictions have also been introduced (will probably be extended in the future).</li>
<li>I changed the function of the ‘contains’ operator a bit. It now only checks the contents of a variable. For clusters/children, there are the new instructions (IsClustesteredBy, LinkExists, ContainsChildren, GetInFiltered,…).</li>
<li>I have added the ‘not contains’ operator.</li>
<li>New instructions:</li>
<ul>
<li>Arithmetic group (+-/*%): I finally caved on those. My <a href="http://janbogaerts.name/wp-content/uploads/2010/01/image2.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 20px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://janbogaerts.name/wp-content/uploads/2010/01/image_thumb2.png" width="559" height="223" /></a>original plan was to see how far I got without using any arithmetic in the neural code. I guess, this is as far as I got with that.</li>
<li>Get-at group: get child at, get cluster at, get out at, get in at, get info at.</li>
<li>Distinct</li>
<li>get Incoming, get outgoing, get info, Get in filtered, get out filtered, Get info filtered</li>
<li>Is clustered by, Link exists, Contains children</li>
<li>Remove-at group: Remove child at, remove info at, remove link in at, remove link out at</li>
</ul>
<li>many, many bug fixes, updates and little improvements.</li>
</ul>
<h4>Aici 1</h4>
<p>This demo is a small chat interface. Though, in it’s current state, it’s not much more than a framework. It can initiate a conversation, close it, ask for the name of the user and store the data. It’s not yet able to fully recognize a recurring user since I haven’t defined the neural code for this yet. </p>
<p><a href="http://janbogaerts.name/wp-content/uploads/2010/01/image3.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 20px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://janbogaerts.name/wp-content/uploads/2010/01/image_thumb3.png" width="204" height="315" /></a> I will be explaining how it works and how you can expand on this functionality, shortly. For those who can’t wait and want to get a peek under the hood, here are some pointers to get started:</p>
<ul>
<li>There are 3 main stages:</li>
<ul>
<li>Flow recognition, which is basically the syntactical stage: check the word types and order. Project pages are: </li>
<ul>
<li>the flows (aici/flows), </li>
<li>the code that is attached to these flows (aici/code/flow code)</li>
<li>the code that recognizes the flows in the input (aici/code/flow recognition)</li>
</ul>
<li>Frame recognition, or the semantics stage. This is where we try to find meaning in the words. Project pages are:</li>
<ul>
<li>the frames (aici/frames)</li>
<li>the code that is attached to the frame sequences (aici/code/frame seq code). The frames don’t have code (yet).</li>
<li>the code that recognizes the frames in the flow results (aici/code/frame recognition).</li>
</ul>
<li>action execution, or the response of the network to the input. Project pages are:</li>
<ul>
<li>Actions: all the different actions that the system knows (not yet a lot, should be extended).</li>
<li>Output: some common code blocks for rendering output. This is also used by the frame sequences, since they are also used to render data in a predefined format.</li>
<li>Action helpers: code that the action neurons can use to perform common tasks, like stopping a conversation or controlling the timers. Timer callbacks are also stored here.</li>
</ul>
</ul>
<li>The transition between the different stages can be located in aici/code/transition. </li>
<ul>
<li>More specifically, the ‘Transition’ neuron is used to go from the flows to the frames and finally to the actions.&#160; </li>
<li>An action is started using the ‘Execute action’ neuron as meaning for a link from a data cluster to the action that needs to be started.</li>
</ul>
<li>The project also contains some mindmaps that describe the inner data structures and functionality.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://janbogaerts.name/index.php/2010/01/20/nnd-0-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NND 0.2 released</title>
		<link>http://janbogaerts.name/index.php/2009/09/12/nnd-0-2-released/</link>
		<comments>http://janbogaerts.name/index.php/2009/09/12/nnd-0-2-released/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 17:43:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[N²D]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[releases]]></category>

		<guid isPermaLink="false">http://janbogaerts.name/index.php/2009/09/12/nnd-0-2-released/</guid>
		<description><![CDATA[I sort of blew out all the cylinders while attempting a first run directly from numbers to the English grammar: memory usage went up to +1.5 gig, thread count was +800 and a gazillion temporary neurons had been created before it all came to a grinding halt. Some redesign was required. So I beefed up [...]]]></description>
			<content:encoded><![CDATA[<p>I sort of blew out all the cylinders while attempting a first run directly from numbers to the English grammar: memory usage went up to +1.5 gig, thread count was +800 and a gazillion temporary neurons had been created before it all came to a grinding halt. Some redesign was required. So I beefed up the execution engine so that you are now able to throttle the maximum amount of simultaneous system threads that are used, which saves an incredible amount of resources and it prevents the app from grinding to a halt (well, that and the removal of a small army of bugs).</p>
<p>I also realized that the flow recognition algorithm simply was not yet mature enough to be used in even the most basic situations. Not just because it was not yet able to process the more complex flow structures, but also because I made a basic design error that I did not yet know off: <em>always put the result cluster on the stack (‘from’ part of link) and the item-to-search in the ‘to’ part</em>. Getting this algorithm ready definitely took the most effort, but it was a grate catalyst to improve the debugger and the execution core. Here’s a (non exhaustive) list of new/changed things:</p>
<ul>
<li>New instructions: GetClustersFiltered, GetChildrenFiltered, Freeze</li>
<li>Added ‘Stop all processors’&#160; and ‘kill single processor’&#160; commands</li>
<li>Added import of VerbNet data</li>
<li>Updated Frame editor so that it is able to edit VerbNet data, this is a work in progress, not all data items found in verbnet can already be edited.</li>
<li>major update to the scanner demo</li>
<li>Added the start of the AICI 1 demo, which will/should soon become able to parse the English grammar (it’s already able to parse the verb ‘to be’ ex: you are, I am, is he, he is, they were,.. (silly I know, but a start is a start!)</li>
<li>Updated flow editor with overlay items, which display the presence of certain (useful) links, like code that is attached to the flow item.</li>
<li>Added a new dialog: ‘Overlay editor’ in the Tools menu for editing the overlays that are defined in a project. This means that overlays can eventually be used everywhere.</li>
<li>new debug feature: split paths, which allow you to track previously recorded paths of processors.</li>
<li>new debug feature: attached neurons, which allow you to track down data changes in threads that should not be allowed to change the data.</li>
<li>Extra info about the static neurons (like the display title and the description) is now stored globally, outside of the project so that I only have to update 1 thing, and not all the projects whenever some documentation needs to be updated. This does mean that you can no longer store any description info for these statically defined neurons.</li>
<li>Updated the <a href="http://www.ebswift.com/OpenSource/WordNetSQLServer/" target="_blank">WordNet</a> sensory interface so that it generates POSGroup objects, which ‘group’ all objects together, that have the same text and part of speech. This saves a grate number of unneeded splits while processing the English grammar.</li>
<li>Made project saving/opening multi threaded so that the UI doesn’t appear frozen.</li>
<li>Many, many small bug fixes all over the place.</li>
</ul>
<p>Perhaps a final note, best to uninstall any previous versions.&#160; I haven’t yet tested how the installer works when it overwrites a previous installation, so it might screw things up.&#160; And off course, you can get the new installer from <a href="http://www.janbogaerts.name/files/setup.exe" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://janbogaerts.name/index.php/2009/09/12/nnd-0-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deadlocks and DotNet</title>
		<link>http://janbogaerts.name/index.php/2009/06/28/deadlocks-and-dotnet/</link>
		<comments>http://janbogaerts.name/index.php/2009/06/28/deadlocks-and-dotnet/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 18:56:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[N²D]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[deadlocks]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://janbogaerts.name/index.php/2009/06/28/deadlocks-and-dotnet/</guid>
		<description><![CDATA[Well, that bear (you know, the deadlocks) turned out to be a formidable grizzly. Now, I don’t know about you, but me, when I see a monster like that, I turn around and run… I can assure you, there’s nothing better than a fierce predator on your tail to streamline things.&#160; First to go was [...]]]></description>
			<content:encoded><![CDATA[<p>Well, that bear (you know, <a href="http://janbogaerts.name/index.php/2009/06/03/nnd-011-released/" target="_blank">the deadlocks</a>) turned out to be a formidable grizzly. Now, I don’t know about you, but me, when I see a monster like that, I turn around and run… I can assure you, there’s nothing better than a fierce predator on your tail to streamline things.&#160; First to go was .net’s WeakReference pattern.&#160; This simply couldn’t keep up with the engine (a change that touched every part of the designer: all editors, toolbox, explorer, thesaurus, timers,…). Next was the ReaderWriterLockSlim thingy (used to protect data blocks from corruption), which has a very peculiar definition of slim: you have no idea how many times I have seen my RAM blown up because of a simple integer scan. Lots of other stuff got tuned up or hacked out as well, so the expected update has arrived.</p>
<p>The engine appears to be stabling out, although it is still acting fishy on single core machines, where there are errors I don’t have on my multi core dev system, so I need to move to a different machine to test this out. The designer is also still very much lingering behind the engine when this is processing at full speed, but the UI should remain responsive now.</p>
<p>I have also included an extra demo project called ‘<em>Scanner</em>’. It is able to transform an input stream containing integers, representing characters, into words and numbers (ints and doubles).&#160; This doesn’t seem much, and it isn’t, except that it is doing this using a couple of flows and a general purpose algorithm (processing is still slow, mostly because the UI is trying to catch up).&#160; This was the guts of the older ‘<em>English language definition</em>’ demo, which I have split into 2: the scanner and the language definition, which is no longer able to do any processing (all code removed). It’s an example of a more complex flow.</p>
<p>The scanner demo also has the <em>number scanning problem</em> fixed (numbers longer than 2 came out with multiple results). This appeared to be caused by deleting a couple of neurons to many (in the scanning algorithm).&#160; I had already experienced the dangers of deleting neurons I thought were no longer used, but which were because of the splits. I will probably have to implement some sort of a garbage collection system to clean up unused neurons (but that’s for later).</p>
<p>Anyway, here’s the latest <a href="http://www.janbogaerts.name/files/setup.exe" target="_blank">download</a> (best to remove previous installation before installing this one).</p>
]]></content:encoded>
			<wfw:commentRss>http://janbogaerts.name/index.php/2009/06/28/deadlocks-and-dotnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
