neural net balancing thing

Last century, when I worked for Orbism, a co-worker, Olivier Ansaldi (now working for Google) showed me a Java applet he was working on which learned how to balance a stick using a neural net.

I decided to try it myself, and wrote a neural net that does it yesterday.

demo (Firefox only)

There is a total of 3 neurons in the net – 1 bias, 1 input (stick angle) and 1 output.

It usually takes about 20 iterations to train the net. Sometimes, it gets trained in such a way that the platform waggles back and forward like a drunk, and sometimes it gets trained so perfectly that it’s damn boring towatch (basically, it’s a platform with a stationary stick on it).

Anyway… for my next trick, I’ll try building a net which can recognise letters and numbers.

Partly the point of this was that it was an itch I wanted to scratch. But also, I wanted to write it in C++ but am better at JavaScript so wrote it in JS to test it first before I attempt a port.

I’m getting interested in my robot gardener idea again, so am building up a net that I can use for it.

Some points about how this differs from “proper” ANNs.

  • Training is done against a single neuron at a time (not important in this case, as there are only three neurons anyway).
  • This net will attach all “normal” neurons to all other neurons. I don’t like the “hidden layer” model of ANNs – I think they’re limited.
  • No back-prop algorithms are used – I don’t trust “perfect” nets and prefer a bit of organic learning in my nets.
  • The net code itself is object-oriented and self-sufficient. It would be possible to take the code and use in another JS project.

fckeditor vs tinymce vs everything else

A few questions for the webdev community – especially javascript coders

Which is easier to use, FCKeditor or TinyMCE? Which is less buggy? Which has the better developers? Which is easier to extend? Are there better editors out there?

I’ve been working with FCKeditor for the last few years, and am getting a bit tired of it.

Almost two years ago, I extended their file manager by providing the ability to delete files or rename them. I submitted the code back to them, and …two years later, you still can’t delete files in the FCKeditor file manager.

Yesterday, I discovered that FCKeditor’s HTML-standards are a little restrictive – it assumes the code will be directly embedded in either the <body>, <noscript> or <blockquote> element. This means that the following code is illegal according to FCKeditor, even though it is legal according to the W3C specifications (if embedded in, say, a <div> element):

<p>some text</p>
<img alt="" src="http://www.fckeditor.net/images/logos.gif" />
<p>some text</p>

I have written some pretty complex code for FCKeditor in the past, including the ability to drag elements from an external list into it, and the ability to create and destroy instances pretty much on the fly, for AJAX apps.

The last paragraph is probably the only reason I am wary of swapping to another WYSIWYG like that *snaps fingers*. I don’t look forward to having to rewrite that functionality – it was hard enough in the first place…

However, today, I spent hours trying to track down a reason why plugins were not loading even though the rest of FCKeditor was. I’m preparing to jump ship now. It’s just too exhausting fixing this editor. I’d prefer to work on a simpler, more robust editor.

I’m tired of its bloat and slowness and am asking you all out there in the web world to tell me what you use, why you use it, and would you recommend it.