Browse Search Popular Register Upload Rules User list Login:
Search:
[LAG] Digit Recognition Neural Network

Image:
screenshot of the scene

Author: Little

Group: Default

Filesize: 177.02 kB

Date added: 2023-03-09

Rating: 5.6

Downloads: 1584

Views: 339

Comments: 6

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Hello Algobox!

Recently I've been interested in AIs, so I decided to create one in Algodoo!
The way most conventional AI works is what's called a "neural network".
Long story short, it's a large array of "neurons", connected by "weights".

So, I decided to create one to recognise digits in Algodoo!

Now I must come clean here, I did not train this network entirely in Algodoo.
About half way through the training, I reimplemented the neural network functions in Python because of how slow Thyme is, and trained it the rest of the way there.

Anywho, it can recognise digits (some of the time)!
This is definitely one of the scenes of mine I'm most proud of.

To use it, click on the 5x5 screen below the "Input" label. Clicking on a tile will flip it from black to white or white to black. Using this, you can write out digits!
Below that screen is a row of 10 digits. The lighter a digit is, the more confident the AI is that it's what you wrote.

Below that is also the digit the AI is the most confident you wrote. You could get this information from the digit row, but it's easier for you to read it this way.

Also, on the right is a visualization of the neural network (A big thanks goes out to Fra32 who helped me build a visualizer, + debug this network!) reading a 7.

Thanks for downloading, have phun!

Update: Slightly changed the title (I wrote the original one at midnight after a very long day of school, many tests :v. I was pretty exhausted.)

2022 - 2023 XCS
If you reupload this scene or part of it, please be sure to credit Little and XCS.
Last edited at 2023/03/10 18:02:55 by Little
Please log in to rate this scene
edit
Similar scenes
Title: Spring Neural Network Image Recognition
Rating: 5
Filesize: 28.13 kB
Downloads: 569
Comments: 0
Ratings: 1
Date added: 2021/10/10 07:35:56
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Local Neural Net PID Controller
Rating: 5
Filesize: 26.24 kB
Downloads: 632
Comments: 0
Ratings: 1
Date added: 2021/10/03 06:03:38
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: AI learns to drive a car
Rating: 5
Filesize: 78.82 kB
Downloads: 202
Comments: 3
Ratings: 1
Date added: 2025/10/18 03:52:04
Made with: Algodoo v2.2.4
Rating: rated 5
download
Title: neural network (ICOR demonstration)
Rating: 5.375
Filesize: 14.22 kB
Downloads: 673
Comments: 0
Ratings: 2
Date added: 2009/11/07 21:15:19
Made with: Algodoo before v1.8.5
Rating: rated 5.4
download
Title: Evoluton of bugs (neural network brain)
Rating: 7.2857
Filesize: 293.48 kB
Downloads: 6555
Comments: 17
Ratings: 8
Date added: 2016/03/26 13:00:29
Made with: Algodoo v2.1.0
Rating: rated 7.3
download
Title: Neural Network Logic Gates
Rating: 5
Filesize: 79.74 kB
Downloads: 787
Comments: 11
Ratings: 1
Date added: 2022/03/26 18:42:11
Made with: Algodoo v2.1.0
Rating: rated 5
download
WOW, very impressive!:tup:

Question: Why do you have so many hidden layers and so many nodes for such a simple task? Is that visualization truly representative of the neural net that you created? :s
Indeed, it is the actual representation!

I originally tried this with a smaller net actually. It worked almost as well as this one except I couldn't get it to recognise 0s consistently, so I started over with a new net.
Okay, sounds logical. In any case I am totally blown away by this scene. The subject (neural networks) is something that I have been interested in for about the past year but I do not yet have the "smarts" for making any kind of scene with it. You were certainly fortunate to have FRA32 help you with it. In my opinion he is a very talented mathematician. :tup:
WHAT HOW:o
Nice scene. Good presentation. Tight code. Rated 10.:tup: _o_

I did the following to get the scene to run at 100% of simulation time:

1. Converted network visualization to an image.
2. Put input box postStep code into onClick.
3. Deleted number display box postStep code.
4. Set simulation frequency to 30.
s_noonan, there's a critical optimization I'm fairly sure I could make that could also help!

Since making this scene I've learned about matrix multiplications!

The way this neural net works is that every single axon is calculated by itself, one by one.

However, I now realize that it would probably be far more efficient to use a matrix to multiply these axons with the weights all at once.