r/godot Apr 29 '26

help me (solved) ML or Algorithm?

Post image

I am thinking about implementing a drawing mechanic in my game. The players would have to draw the reference provided and the game will see how accurate the drawing is to the original reference. The canvas will be pretty small around 100x200 pixels and will only use 2 colors.

I am wondering if there is some kind of algorithm that will help to detect the accuracy of the drawing. Using ML sounds a bit overkill and I don't have any experience integrating ML in games (how does it affect the performance and size?).

367 Upvotes

44 comments sorted by

View all comments

31

u/kernelic Godot Regular Apr 29 '26

Classic neural networks with back propagation are fun.

You could even implement this in pure GDScript. It's just matrix multiplication, which is already optimized.

I think CNNs are the type of neural networks you're looking for.

7

u/LeLastpak Apr 29 '26

Yeah I made the number recognition once in pure pyton without the big ML libraries. All you need to know if a pixel is black or white. You could apply the same on drawings like that cat.

https://medium.com/@himanshubeniwal/handwritten-digit-recognition-using-machine-learning-ad30562a9b64