-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|474|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Blogs Home -> Blogs


 
Pakz
Created : 07 March 2024
Edited : 08 March 2024

Old computer



My mum has been trying to fix her home. Getting rid of lots of old stuff. She asked if I wanted my stepfathers old computer and monitor. An old desktop Celeron J3060 with 4gb of memory. It took me close to 2 days before it got updated. Old fashioned HDD. But it has a 1tb drive.
Next year Windows 10 wil no longer get updates. So one year of use left.

I got the idea to use it for a kind of 'fishing'. I wanted to see if I could create a program that could convert a canvas its content to drawing instructions. My idea was to use a genetic algorithm for that.

The old Celeron is only about 5x times slower than my fastest device. But it can be left on for days if needed.

I got to the point where I did all the population and mutation and lots of testing. In about 10.000.000 passes it gets close to turning a letter from the alphabet in a series of line instructions. It is not very smart. Just brute force and looking at the highest scoring sets of line instruction scripts.

I need to further tweak the code. Make a nice interface. Turn the line coordinates into javascript code. And put this into a text area when the percentage similarity is close to 99.99.

Quite fun and educative. I got new insights in how to do things like ocr and genetic algorithms.

The corrent html page with the code and a visual animated progress display is here : (It might take 5 to 10 minutes before it begins to look like the inputted letter)





Stil tweaking. I have to check each letter. And discover tricks to speed it up.

 

Comments


Saturday, 09 March 2024, 23:34
Pakz
Ok. So I spend 8 hours yesterday tweaking and modifying the weights to get different results. Made it so it does al important characters of the alphabet.
Broke the code at places though. There are various NaNs and undefined variables in the scripts. Which will cause the progress to get stuck.

For getting a stylized font out of the tool might be a use. Skip out before .999 percent identical.


Comparing was easy. I let Gemini make a function that compares 2 arrays and give a score between 0.0 and 1. Do random stuff and pick the highest score to add to population every time and continue.



I let a older version run for maybe 16 hours on the old pc. Did a 100.000.000 passes. But did not complete the first character.

I was able to learn stuff about ocr through Gemini. Path tracing and the option to discus scientific papers on approaches . Figured some new Debugging ideas. And more xp gained.


Back to fixing my back problems. Got a whole series of new exercises the last 2 weeks. My upper back has never felt this great since I was diagnosed with scoliosis.
Tuesday, 12 March 2024, 13:54
Pakz
The old computer got replaced with a new computer. A small, almost pocket size mini pc from amazon. It has 16gb of memory, a intel n100 cpu and 512 gb of ssd storage. Was only around 200 euro's.

It is only 20% slower in single core than my main (4500u 8gb amd) laptop. And 50% of the multi core performance.

Wil be using it to run various slow gfx generator's for hours on end. Without it costing to much electricity.

It has windows 11 pro.
Tuesday, 12 March 2024, 13:58
Jayenkai
Gosh! Just goes to show what tech they can cram into a tiny box, nowadays.
Tuesday, 12 March 2024, 14:03
Pakz
The usb? or hdmi? stick pc's are kind of nice too. But spec and price is not that great.
Tuesday, 12 March 2024, 14:35
Jayenkai
The whole mini Windows pc that can generate art, but is pocket sized! So cool!!
Tuesday, 12 March 2024, 14:43
Pakz
I think Samsung recently announced a kind of low powered neuromorphic chip. This for those neural net ai's that can generate art like Dali does.

These use hundreds of times less energy than the current chips. Chaptgpt and dali and even movie ai might get real cheap pretty soon.