Bragi's take on neural networks, AI and more RSS 2.0
# Monday, April 27, 2009

Crohn complications have slowed me down a bit over the last couple of weeks, but everything seems to be coming under control and progress has slowly picked up again. So, it's become time again for a new update before I start explaining the new stuff in depth.  These are the main changes:

  • The undo system is starting to be functional.  There's still something going wrong with undoing some link operations, but that'll be sorted out soon probably.
  • There's a new expression type: the global, which is a variable that is able to retain it's value for as long as a processor is alive.  It's also possible to determine what should happen with a global during a processor split: copy or duplicate the value, or do nothing. This is done with an outgoing link on the expression, so you can change it dynamically.
  • You can now easily attach and edit an unlimited number of code clusters to any neuron from the code editor.  This is useful to attach code to a neuron that shouldn't be executed directly by the processor (the actions and rules link) but is stored as data, to be retrieved and called from code. Flows for instance use this to attach code that needs to be called by the parser during different stages of the parsing process.
  • The debugger is starting to become fully operational with a useful interface.  There are still plenty of quirks that need ironing out, but it's starting to become useful. Here's a screenshot of the debugger in action (I'll explain what everything means and how to use it later on):

    image
  • Many, many bug-fixes.

The scanner and parser are almost working.  You can already push text to the network, which  is almost parsed into words (some quirks still left).  It doesn't yet know what to do with the words though (so the link between the scanner and parser is still broken), this is why I needed the extra functionality in the code editor. I'll explain the scanner and parser's details in a later post. For now, check out the new release.

Monday, April 27, 2009 8:05:46 PM (Romance Standard Time, UTC+01:00)  #    Comments [2] -
Updates
# Sunday, April 05, 2009

After using the flow editor a bit, some of the more annoying errors became pretty obvious, so it's time for a new update (well, full install again) to the flow editor. Besides the more obvious bug fixes, I've also introduced some new functionality, notably:

  • shortcuts 'N' & 'ctrl+N': add/insert a new neuron.
  • shortcut 'R': toggle 'selection Required' for current option/loop.  This is an important feature that I missed (in gene this was no problem since you could use an empty condition which is not possible here).  The problem is this: sometimes, an option or loop has to require at least 1 selection between a part (so you can't skip the condition or flow), sometimes this is not required.  To allow a distinction between the 2, an extra 'attribute' is attached to the conditional (the loop or option), much the same as how a selection between loop and option is done.
  • I changed the layout from wrap-panel to horizontal stack-panel, which is more logical to work with.

Note: I have updated the table on the first post about the flow editor so it contains the new shortcuts.

I will probably also have to implement a new statement type, to allow for grouping very soon.  It's not really needed for defining the flows, but I think it can be useful later on, during the parsing. For instance, the expression: (verb "ing") means that you are expecting a verb, with ing behind (standing, listening,...).  You don't need the brackets to define it, but it makes more sense while parsing, if the grouping statement has an attribute attached to it that indicates how it needs to be interpreted.

I have also noticed a 'logical' error in the way that I implemented keyboard navigation: some keys have been reversed. So when you are on an item inside a part and need to get to that part, use the left arrow instead of the right.  Being able to select a part is important to continue adding items at the end again when you have added a conditional like in the next image. It's annoying, but fuck it, this is one for later on.

image

I'm also not yet very happy with the deletion functionality.  As it is at the moment, you can remove or delete.  Removing simply takes away the reference to a neuron in a list, deleting, will remove the neuron from the brain.  This is annoying, cause you usually want to remove statics and delete conditionals and parts.  If you want to remove an entire condition, you need to first delete all the parts separately.  A better scheme would be as that of the code editor, which will check for this type of situation.  Again, this is a minor thing, so I will add it to the feature list. At the moment, there are more important things to do though.

A bit more interesting, I have also began work on an English grammar definition.  Here's a screenshot of a part:

image

It's off course not a definition that covers the complete language, but I think it should be enough to build a natural language interface, which should be interesting. I'm certain I missed a bunch, I still need to define adverb handling (which will be treated in a pre parser, a bit like how comments are handled in more traditional parsers) and the scanner also needs commencing.  And expect some shuffling around and updates as I implement the parser for this definition.  At this stage, extra attributes will probably be added, to handle more semantically oriented parsing. I have no idea how long this is going to take me, but I expect some issues with the debugger, so I might be out for a week or 2 for the next update.

Sunday, April 05, 2009 8:29:50 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
Updates
# Tuesday, March 31, 2009

I've added support for flow editing, which should be the final 'big' editor required to create useful networks. From now on, only finishing functionality and bugfixes. It took a little longer than I had originally planned, mostly because of a struggle with WPF's keyboard navigational system, which is crap. I finally got it working though (it also supports drag and drop, copy-paste still needs implementing), hope you like it.  You can download the program from here. Unfortunately it's still a full install, so it's the whole 40 and some megs download.  I'll try to find some time to create an update installer so that the download size can be minimized.

The editor is still a bit rough, but it should be useful. I've tried to make it more text oriented, so you can easily navigate/add/remove items from the keyboard.  In the background though it's still listboxes so coding the view and data was easy and fast, just that creepy WPF navigation system, off course more importantly, it makes certain no illegal input can be provided.

Anyway, here's a screenshot:

image

Basically, this Flow editor describes how a noun can be found in a stream: a noun should start either with an article (which is either 'a' or 'the') or a number, followed by 0 or more adjectives finalized with a single noun.  Ok, there are gaps here (it's still a sketch to show the editor): what's a number, adjective or noun and how to find them.  These things will be explained in the demo, but basically, you use converters (functions that can transform a neuron into another one, like the object 'house' into the neuron 'noun') or some other info that can be used in a search function which can be attached to the flow items.

To create one yourself, go to 'Insert/Flow editor', use the toolbar button 'Create new flow editor', use the toolbar button on the 'Project' overview tool frame or use it's context menu. Press 'F' to create a new flow followed by a '.' to select a static or '['/'{' for an option/loop (press '|' to add new parts in a loop or option). Here's a complete list of available short cuts:

Shortcut

  Meaning

arrow left

  go to the previous flow item

arrow right

  go to the next flow item.

arrow down

 
  • When on a conditional block: go to the next conditional block
  • When on a static item: go to the first item of the next conditional block.

arrow up

 
  • When on a conditional block: go to the previous conditional block
  • When on a static item: go to the first item of the previous conditional block.

end

  go to the end of the current list, when at end of current list, go to end of parent list, until the end of the flow is reached.

home

  go to the start of the current list, when at start of current list, go to start of parent list, until the start of the flow is reached.

Ctrl + arrow/end/home/mouse click on item

  select multiple neurons.

Alt+arrow down

  go to the next flow

Alt+arrow up

 

go to the previous flow

.

 

open a popup for selecting a 'named' neuron to add at the end of the current list as static.

ctrl+.

 

open a popup for selecting a 'named' neuron to insert at the current pos as static.

{

 

add a loop at the end of the current list.

ctrl+{

 

insert a loop at the current position.

[

 

add an option at the end of the current list.

ctrl+[

 

insert an option at the current position.

}

 

change the currently surrounding option to a loop.

]

 

change the currently surrounding loop to an option.

R

  toggle 'selection Required' for current option/loop

|

  add a new part in the first parent loop or option of the currently selected item.

ctrl + |

  insert a new part in the first parent loop or option of the currently selected item.

del

 

remove the currently selected item from the list, but don't delete the actual neuron.

ctrl+del

 

delete the actual neuron.

O

 

Add a new object (neuron cluster with meaning 'Object') at the end of the current list.

ctrl+O

 

insert a new object (neuron cluster with meaning 'Object') at the current position.

N

  Add a new neuron at the end of the current list.

ctrl+N

  Insert a new neuron at the current position.

Double click on static

  Go to the flow.  This is only available when the static is a reference to another flow.  This is indicated by a line underneath the static.


A final note perhaps on how to use these flows in a neural network.  The thing is, this is really up to you, the application doesn't make any hard-coded use of them. Though, there will probably be a couple of default algorithms that can be reused.  The basic idea is relatively simple: when the first neuron comes in, search all the clusters to which it belongs with the meaning 'Flow', 'FlowItemConditional' or 'FlowItemConditionalPart' and store the result list in a cluster.  When the second comes in, try to find all the clusters of the previous result set that allow the new neuron to follow the previous one, all clusters that don't allow this are removed from the result set.  Various clean ups / lookups can be performed during 2 incoming points. When a 'flow' cluster is found with code attached to it, execute this. This off course, can be made as simple or as complex as you want. More on this in a later post. Fuel is depleted for today.

Tuesday, March 31, 2009 8:11:56 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
Getting started | Updates
# Friday, March 20, 2009

There's a new update available for N²D. The major change is with regards to how the split functionality works. In the original design, the processor's stack was used to return any results at the end of a split. This was causing problems, especially with nested splits where stack contents get duplicated.  In the original design, stack duplications didn't generate new id's for the neurons, which was changed, for good reasons.  Unfortunately, this created a problem for the split: split result were unwanted getting duplicated.  You now how it goes, pull the sheet a bit on this side, only to uncover it on the other one.

The solution was very simple and pretty elegant: use a different list to store the result of a split. So now a processor has 2 internal lists: the execution stack used to build the code that should be executed next and a list with the split results (unique neurons) and their weights. A couple of new instructions had to be created to control this list.  No biggie: an Add, Remove, Get and Clear.

Anyway, I'm updating all the documentation now.  If I mist something, don't forget: 2 separate lists. The next post will probably be a Demos explained on the split.

Friday, March 20, 2009 8:53:48 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] -
Updates
Categories
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Jan Bogaerts
Sign In
Statistics
Total Posts: 10
This Year: 0
This Month: 0
This Week: 0
Comments: 3
Themes
Pick a theme:
All Content © 2010, Jan Bogaerts
DasBlog theme 'Business' created by Christoph De Baene (delarou)