Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript and AI, fact or fiction? [closed]

In the tv I saw some interesting robots. These had some diodes, sun collectors and some motors. The diodes decided where the light is, so they turned the robot into the direction, which fed it with light. It kind of followed the light.

Now, based on this I was wondering about some easy AI. Is there as way to write an engine which can learn from the user interaction?

As a starter, it would be enough to learn and remember only for the session the user is on the page.

Any help is appreciated.

like image 694
nagymafla Avatar asked Jul 20 '11 17:07

nagymafla


2 Answers

In short, yes. But don't reinvent the wheel, and you need to determine what kind of "learning" the AI will do. That is, what do you want to achieve?

You might like brain.js, a neural net framework for JavaScript:

http://harthur.github.com/brain/

like image 88
jimbo Avatar answered Sep 27 '22 23:09

jimbo


http://www.ovaltech.ca/Neural_Ant.zip

http://www.ovaltech.ca/neuralant.zip

Here is some source code and a fairly simple neural net program in C I believe. Probably could use something similar to try some AI in javascript. The thought of using some basic AI on a web page has crossed my mind, but I could never really decide what it could be used for. Image recognition is the most likely use, but I really do not think javascript could do this.

Like someone else pointed out, neural networks are resource hogs and should probably be written in a more powerful language like C# or something and plugged in. I would be interested if you discover any potential use for AI on a web page, written in javascript, which still performs well.

like image 33
MrHayman Avatar answered Sep 28 '22 01:09

MrHayman