Sunday, March 15, 2009

Vienna




Friday, February 20, 2009

Draw a custom function in ActionScript



Here you have the sample. Fill the function input text with your custom function. You may use any standard function, sin, cost, sqrt, etc and any arithmetic function. Then you could choose the precision between 0.01 and 10 and of course you may set the scale (the default is 10).

E.g.: write down "sin(x)" function in the input text field. Press then Live Draw Function to see the results.

Source code may be viewed using "view source" context menu.

PS: You may draw some circles using the mouse on the draw surface. It's not a bug, it's a feature! :D

Tuesday, February 17, 2009

Digit Recognizer - first step in ActionScript

I've implemented first machine which recognizes digits. I have used U.S. Post Database of digits to train the machine, and I have also used their database to test the machine. For each row, first number represents the digit and the next 256 numbers represent the input matrix (16x16).

First impression is that ActionScript is too weak for numeric computation. In the implemented machine I've got 256 input neurons, 20 hidden neurons on a single layer and of course 10 output neurons. Of course I've tried to increase the number of neurons on hidden layer but this seemed to be unreliable to actionscript 'cause AIR application just blocked after few seconds of computation. All after all, with the previous configuration I have succeded to train the machine to recognize ~1800 of 2007 digits from tests (the best case was 1815, but in general, over 1800) after a few trainings (generally after the second train). See the example here. It would take more than 10 seconds to train the machine but test would run great (works on my machine).

I must admit that the computation in getting results (even in many tests like those from this file) is done fast enough in ActionScript so I am sure that a component developed in Flex would be capable to run in normal conditions if it had the weight matrix computed previously. I am afraid that a learning machine would be ineffcient if it has been implemented in ActionScript so this is the reason why I think matrix of weight computation in backpropagation algorithm should be done in another layer using another programming language (e.g. Java and OpenAMF).

For those who are sceptic, an example of application for digit recognition: a replacement for captcha texts (draw a digit and we're sure you're not a robot).

Here you have the source code for NeuralNetwork class. Suddenly, comments are lost when the file was uploaded on ftp :D (coming up)

Monday, February 16, 2009

Neural Network in ActionScript 3

Keywords: neural network, backpropagation, supervised learning

Actionscript Neural Network = annet - the package developed to solve classification problems using supervised learning.

First problem implemented: XOR Problem
0 ^ 0 = 0
0 ^ 1 = 1
1 ^ 0 = 1
1 ^ 1 = 0

See the example here. You should train the network first pressing "Train" button first.

Coming up next: Digit Recognizer Component

Monday, January 26, 2009

Recesiune intelectuala

Ich kann nicht verstehen, die Menschen, die gerne andere Menschen leiden zu sehen. Ich gehöre zu denen. Meine Pläne sind zu vernichten den Feind, ein Feind, der geistigen existiert nur in meinem Kopf. Es ist an der Zeit für den Wandel. Jetzt ist es an der Zeit, dies zu ändern ist, um zu einem besseren Menschen.

Wednesday, January 21, 2009

Html Manager for Dummies

Am tot lucrat de ceva vreme la un Html Manager care a inceput sa o ia pe drumul cel bun. Cel putin asa mi se pare. Sa va spun despre ce este vorba. Este o scula facuta in Flex, ce lucreaza cu obiecte PHP (prin AMFPHP) si care ma ajuta sa creez site-uri foarte rapid, folosind mai multe tipuri de pagini, ce au anumite tipuri de elemente.
Spre exemplu, am o pagina care are informatii, apoi un rand de poze, apoi mai jos alte informatii, un formular construit dinamic cu care imi pastrez datele si cu ajutorul caruia obtin informatii de la utilizatori; in partea dreapta o reclama specifica, sau un grup de link-uri de pe site.
Practic un nou site inseamna un alt design, adica css + header + footer. In rest o mica aranjare a site-ului nu ar schimba cu nimic structura managerului.
Avantaje tot sunt, pentru ca se foloseste pentru administrare un RIA facut sa faciliteze lucrul cu baza de date, cu paginile, cu relatiile dintre ele.
Aruncati o privire spre http://ski-bulgaria.travelplanner.ro pentru a va convinge de utilitatea framework-ului.






















Saturday, November 8, 2008

Keyboard Twister

Poate că sună aiurea pentru prima dată. Dar zilele trecute mi-a venit în minte un joc, când stăteam cu gabi la calculator. Ce ar fi dacă am putea juca twister însă la tastatură in loc să te împarți prin toată casa (sala, grădina, camera, subsolul, beciul etc). Lucrurile stau cât se poate de simplu. Calculatorul îți generează un caracter ce se află pe tastatură (la întâmplare, după un range de tastatură selectat), iar tu va trebui să apeși acea tastă și să o ții apăsată până la următoarea tură.

Chiar dacă sună prea geek, acest joc ar putea fi interesant, în momentul în care joci în rețea și îți împleticești degetele pe tastatură, încercând să apeși o combinație de taste din cele mai ciudate (pe lângă ciudatul CTRL + ALT + DEL).

Deja m-am gândit la o modalitate de a implementa acest joc. Simplu ar fi folosind Flex, iar partea de server si comunicare sa o faci cu php, amfphp, sau .net si weborb.