Log In  

Cart #ml101_perceptron-1 | 2022-12-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
27

Why this educart?

The perceptron is a tiny computing unit that is a fondamental block of artificial neural networks.

Because machine learning is getting more important everyday, I thought I would share the little knowledge I have in the form of a chewable educart, hoping more people would get interested in the inner workings of machine learning algorithms.

Tell me if you found this useful and if I should make more. Also, I'm not a ML specialist and English is not my primary language so any suggestions to make this cart better will be appreciated!

♥pck404

Additional cart : interact with the perceptron in real-time

Cart #pck404_perceptron_lr-0 | 2022-12-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
27

Sources and links

My main source for this cart is Daniel Shiffman's wonderful "Nature of Code" as well as the Coding Train video series on neural networks.

Changelog


V2 :

  • add rewind (go back to previous text/screen)
  • add interactive cart with adjustable learning rate
P#121810 2022-12-04 17:34 ( Edited 2022-12-05 23:57)

1

This is great! I look forward to a continuation of this.

P#121820 2022-12-04 20:00
3

Thanks! I'm glad you're interested and I already have plans for a continuation :

  • talk about the bias (the third input of the perceptron) that was eluded in this cart
  • use multiple perceptrons together to approximate the XOR function
  • visualize how backpropagation works

For other topics involving neural networks, I'm not sure how far can Pico-8 go. I've seen MNIST running but for more complex things I may just fake it and show pre-rendered images. For example I would love to dig into stable diffusion and create visualisations for it. But it wouldn't have any practical use in Pico-8.

P#121826 2022-12-04 21:09
1

Really interesting, and well put together. The limitations of PICO-8 actually force you to keep the descriptions short, making them more understandable, and you've hit the nail on the head with this!

It often takes longer to write something shorter than a bloated piece of text, but the reader appreciates it. As Blaise Pascal wrote - "Excuse the long letter, I didn't have time to write a short one"?

Look forward to seeing more of these :-)

Thanks very much.

P#121831 2022-12-04 22:54
1

I like that you were able to have the learning part running in real time - it was fun watching points landing and the line moving or not as I read the ending bit of the text.

P#121862 2022-12-05 19:14
1

@PaulKnight, thanks for these kind words. It was fun and challenging to split the description in small chunks and tune the pacing. I'm glad you liked it.

@packbat, I also thought it was funny to see the algorithm run by itself, getting better over time until a single misclassified point makes the prediction go wrong.

I added a standalone screen that let you control adjust the learning rate and see the effect it has. Also, now you can rewind to the previous text or screen.

P#121880 2022-12-06 00:12 ( Edited 2022-12-06 01:48)
1

Thanks, I know nothing about ML and I appreciated this!

P#121903 2022-12-06 12:16

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 17:36:29 | 0.054s | Q:30