It seems to me that trying to give explicit formulas for gradients is just swamping the beginner with unnecessary details that don't help to build intuition. I think the author made exactly the right choices.
It used to be that some NN tutorials would swamp the beginner with backprop formulas, which beginners were forced by their professors to memorise. I don't think this succeeded at doing much; it only made the subject seem more complicated than it needed to be; and I think it should all be abstracted away into autograd.
import torch as scratch
from scratch import nn import torch as scratch
from scratch import nn import antigravity
https://xkcd.com/353/https://windowsontheory.org/2020/11/03/yet-another-backpropa...
I'm trying to make mobs behave autonomously in my 3D action MMO.
The memory (depth) I would need for that to succeed and the processing power to do it in real-time is making my head spin.
Let's hope Raspberry 5 has some hardware to help with this.
At this point I'm probably going to have some state machine AI (think mobs in Minecraft; basically check range / view then target and loop) but instead of deterministic or purely random I'm going to add some NN randomness to the behaviour so that it can be interesting without just adding quantity (more mobs).
So the inputs would be the map topography and entities (mobs and players) and the output whether to engage or not, the backpropagation would be success rate I guess? Or am I thinking about this the wrong way?
I wonder what adding a _how_ to the same network after the _what_ would look like, probably a direction as output instead of just an entity id?
https://www.oreilly.com/library/view/ai-for-game/0596005555/...
Neural nets and machine learning in general are good for problems whose solutions are hard to hand-code. If you can hand-craft a solution there's no real need for machine learning and it might simply take up resources you need more elsewhere.
I'm thinking each group of mobs has a server directed leader, who's position is server deterministic and then to save bandwidth the PvE minions and their movements can be generated on each client, just tracking when they are killed.
I'm not scared of desyncing in the details. As long as the PvP stuff is coherent.
from 1997, a bit more fancy: https://web.archive.org/web/19990117022955/http://www.hav.co...
1- In the instruction `hidden_layer.data[index] -= learning_rate * hidden_layer.grad.data[index]`where was the `hidden_layer.grad` value updated?
2- from what I've understood, we'll update the hidden_layer according to the inclination of the error function (because we want to minimize it). But where are `error.backward()` and `hidden_layer.grad` interconnected?
`.grad` is set by `autograd` when calling `backward()`
Probably the easiest way to understand this is to play a bit with `.grad` and `backward()` on their own, with the first code sample in the `autograd` section [1].
[1]: https://sirupsen.com/napkin/neural-net#automagically-computi...
[0] like this
I did the ML Coursera course by Andrew Ng a few years ago. I liked the material but I felt the course focused a little too much on the details and not enough on actual application.
Would learning DNN from a book like 1. https://www.manning.com/books/deep-learning-with-pytorch or 2. https://www.manning.com/books/deep-learning-with-python-seco...
Be a better approach for someone looking to learn concepts and application rather than the detailed mathematics behind it?
If yes, which of these two books (or alternative) would you recommend ?
Link to one video: https://www.youtube.com/watch?v=Wo5dMEP_BbI