I've read about a dozen articles on how a NN works. 2 inputs. An optional bias. One output. Hidden layers. Activation function etc but every article so far fails to explain what the inputs are, how they are determined and why a sigmoid function that results in a 0/1 could be remotely valuable.
I'm obviously biting off a lot here, but, as a project and experiment, I'd like to see if a NN can replace the behavioural tree my bot hockey players use.
Can I fed into a single bot brain (a mini NN) the status of things around it (puck location, player proximity, velocity vectors etc) and then output the best course of action?
I have the sports game coded and it works. Bots already play each other with behavioral trees and a big finite state machine.
Time for next level. If I find a way forward I would do this incrementally with a small network and build it up over time to consider an ever increasing range of environment data (virtual world data) and an ever increasing range of outputs (actions).
However, I'm still puzzled over how all these articles talk about inputting 0 & 1 and getting back 0 & 1 and then assuming that means something.
(Also noting this is a Love2d forum and not a NN ) forum.
Can a neural network learn to play hockey?
Can a neural network learn to play hockey?
Last edited by togFox on Mon Feb 22, 2021 12:10 pm, edited 1 time in total.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Can a neural network learn to play hockey?
Yes, this is doable. Look at reinforcement learning and specifically TD3 or AC3 - it's quite a simple actor-critic model that works on continuous action spaces. If you already have bots, you could task the agent (or a group of them) to play against your bots or against each other.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Can a neural network learn to play hockey?
Well, on your advice I took a deep dive into AC3 and I can see it is a perfect fit and the next few months will disappear into research, maths and trial and error.
Thanks for removing me from my family and life in general. Lolz. :=) Let's see what comes of it.
Thanks for removing me from my family and life in general. Lolz. :=) Let's see what comes of it.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Can a neural network learn to play hockey?
Oops, there was a typo. It is A3C, not AC3. My bad!togFox wrote: ↑Mon Feb 22, 2021 9:53 pm Well, on your advice I took a deep dive into AC3 and I can see it is a perfect fit and the next few months will disappear into research, maths and trial and error.
Thanks for removing me from my family and life in general. Lolz. :=) Let's see what comes of it.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Can a neural network learn to play hockey?
Thanks. I worked it out. I couldn't find any meaningful articles that explained how to code this. All articles and blogs talk about the theoretical trainer and asynchronous agents - which is great, but I'll need to sleep on this and hit up some NN forums somewhere.
Thanks.
Thanks.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Can a neural network learn to play hockey?
There are plenty of implementations online. You can either follow the original paper: https://arxiv.org/pdf/1602.01783.pdf
Or look at the many pytorch implementations: https://github.com/ikostrikov/pytorch-a3c
You'll have to implement a lot of NN functions in Lua though, probably using something like Autograd (https://github.com/twitter/torch-autograd/) as a base.
Or look at the many pytorch implementations: https://github.com/ikostrikov/pytorch-a3c
You'll have to implement a lot of NN functions in Lua though, probably using something like Autograd (https://github.com/twitter/torch-autograd/) as a base.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Can a neural network learn to play hockey?
Thanks. After reading many many many very high level papers, blogs, articles, and then switching to more articles demonstrating python, I ALMOST gave up.
I then happened across this github: https://github.com/FlamingArr/luann/com ... 988ab7415c
It is a working demonstration that not only works with LOVE - it actually requires LOVE.
Now, sadly, it prints a lot of guff to the console that I don't understand yet but I now have working code I can start to unpick and unravel.
[also noting the github code is for an ANN - not a A3C. Baby steps]
I then happened across this github: https://github.com/FlamingArr/luann/com ... 988ab7415c
It is a working demonstration that not only works with LOVE - it actually requires LOVE.
Now, sadly, it prints a lot of guff to the console that I don't understand yet but I now have working code I can start to unpick and unravel.
[also noting the github code is for an ANN - not a A3C. Baby steps]
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Can a neural network learn to play hockey?
This is not about NN but I read the posts about your sports game and was reminded of this project:
https://sourceforge.net/p/podball/wiki/Home/
It is also a 2D sports game with programmable AI-teams. Not my project.
But I once made a state-machine-AI for it. ( https://www.youtube.com/watch?v=tG7mHW9sIKQ )
https://sourceforge.net/p/podball/wiki/Home/
It is also a 2D sports game with programmable AI-teams. Not my project.
But I once made a state-machine-AI for it. ( https://www.youtube.com/watch?v=tG7mHW9sIKQ )
Who is online
Users browsing this forum: No registered users and 1 guest