You are browsing as a guest. Sign up (or log in) to start making projects!

Moot

  • 3 Devlogs
  • 6 Total hours

Continuing my trend of useless and impractical tools, Moot is a neural network trained on 80,000 arithmetic examples to basically guess the answer to your equations! Yes, it’s slower, yes it’s less efficient, yes it’s less accurate, but it’s funnier :D This came from an idea I had to make a neural network do something it’s really bad at, but I was really surprised by how decent it is!

Ship #1 Pending review

I made Moot! It’s a neural network trained on 80,000 examples to do something a neural network was never made to do; maths! :D
I was very surprised by how capable it was. Up to 4 or 5 figures, it can guess the answers to equations with surprising accuracy.

What to try:
I’d recommend managing your expectations. Try some small equations, e.g, 50 + 5.

Why?
Fun! Computers are so annoyingly fast these days that we take such impressive speeds as trillions of calculations a second for granted. This puts into perspective how optimised things have become, by making something intentionally unique. Also, neural networks think kind of similarly to how humans do, so I guess you can make something poetic out of that! XD
I hope you enjoy testing Moot! I had a lot of fun making it. Here’s some more info if you care!

How it works:
When you press a button on the keypad, it adds that key to a string. That string is then parsed, separating the numbers and removing the plus sign.
That’s then divided and sent over to the server, which takes the inputs and squishes them down to values that the activation function (leaky-relu) can understand. The server then multiplies the inputs through the weights of the neural network, before sending the estimation back to the client. It’s then put through another multiplication to scale it back. This is a simplification of the steps, but it’s the basic concept.

The stack:
SvelteKit all around! But it also uses brain.js for the neural network.

That’s all I have to say! I hope you enjoy it.

  • 3 devlogs
  • 6h
Try project → See source code →
Open comments for this post

27m 45s logged

Final devlog.

The first time I wrote this the SD website glitched and failed to submit it, so I’ll make sure to copy it this time in case that happens again XD

Anyway! Here’s what I did.

I fixed some bugs on the +page.svelte (home page) regarding the displayText.

I polished the other pages’ UI (the generateDataset and trainFrontend).

I also then added a feature to block the trainFrontend based on an .env variable. :)

That means nobody can spam it and crash the host server during voting.
Lastly, I committed the training data, because why not? :)

It also helped the Vercel deployment, since I didn’t have to manually add it.

0
0
5
Open comments for this post

2h 20m 16s logged

Big updates! More productive devlog today!
I added a bunch of fallbacks. Some for if the user only enters one number, some for if the user enters too many, etc.

I changed the UI, making it uncomfortably brightly coloured to enhance the experience :) Yay, gradients :D

I also added a bunch of different loading messages, which you can see in the image.

I also made it so that the model can calculate equations outside of its range!
It’s trained on arithmetic addition from 0-100. Beyond that point, it would just guess! Now, I’ve got a function that takes the inputs, checks if the highest one is over 100, and multiplies it down! (Actually, it’s between 0 and one, but the valid ranges are 1-100, because that’s how it’s sent through.)

Now it can calculate numbers in the hundreds, even thousands with accuracy!

Although it does taper off going further than 5 figures :)

I also added a nice starting page to kinda explain the project (it’ll all be explained in the ship notes too, just thought I might as well.)

I fixed several edge cases (who knew a calculator would have that many???), also adding a bool to track whether the screen’s state is “volatile”. AKA, if the calculation’s completed and it’s displaying the answer, then - when an input occurs, it’ll clear everything and start a new equation (there’s an easter egg hidden in that logic! Feel free to check it out in the repo lol).

To-do still:
Improve the UI of the other pages or just remove them from the build. By the “other pages”, I mean the page I used for training, and the page I used for dataset generation.

I’d love your feedback on this, actually!

I wouldn’t want unauthorised people to overload my hosting server with “train” instructions.

I made the calculator input panel a SvelteKit {#each} block. This was kinda a strange choice on my part, but it keeps the code looking organised and less repetitive.
It also means if I want to change one element (e.g, the CSS class name or the function name) I just have to change the one box.

Thanks for reading!
Happy coding! :D

0
0
10
Open comments for this post

3h 25m 36s logged

Moot!
I got the neural network working! :)

I trained it on various amounts of data, and it works okay sometimes.
I’m trying to improve it! I’ve spent a lot of time changing things like the amount of data, normalisation algorithm, etc.

I also got async processing working so it works across cores instead of just one, making it SO much faster! I decided on leaky-relu because:
Sigmoid isn’t accurate for the magnitude of values I’m using, and ReLU isn’t changing at all!

I’m still playing around with learning rates and stuff.

Next, I plan to:

Fix the calculator for values above 1000, because I don’t feel like training it for that much data.

And improve the UI and UX!

Sorry for the boring devlog, it’s difficult to show when it’s all code instead of a nice website :)

I designed the UI first too!
I’m also gonna add the annoying messages and delays that are in the image below! They’re gonna show up individually, not all together lol

That’s the Figma design. The other image is the current website look! I also need to get the “+” and “=” signs looking the same.

One last thing! I added this cool system (code image below) which seems to work pretty well!

Sorry for the weird layout, I’m kinda distracted right now lel.

Thanks for reading! :D

0
0
20

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…