Learn Unity ML-Agents – Fundamentals of Unity Machine Learning
Incorporate new powerful ML algorithms such as Deep Reinforcement Learning for games
- 204 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Learn Unity ML-Agents – Fundamentals of Unity Machine Learning
Incorporate new powerful ML algorithms such as Deep Reinforcement Learning for games
About This Book
Transform games into environments using machine learning and Deep learning with Tensorflow, Keras, and Unity
Key Features
- Learn how to apply core machine learning concepts to your games with Unity
- Learn the Fundamentals of Reinforcement Learning and Q-Learning and apply them to your games
- Learn How to build multiple asynchronous agents and run them in a training scenario
Book Description
Unity Machine Learning agents allow researchers and developers to create games and simulations using the Unity Editor, which serves as an environment where intelligent agents can be trained with machine learning methods through a simple-to-use Python API.
This book takes you from the basics of Reinforcement and Q Learning to building Deep Recurrent Q-Network agents that cooperate or compete in a multi-agent ecosystem. You will start with the basics of Reinforcement Learning and how to apply it to problems. Then you will learn how to build self-learning advanced neural networks with Python and Keras/TensorFlow. From there you move o n to more advanced training scenarios where you will learn further innovative ways to train your network with A3C, imitation, and curriculum learning models. By the end of the book, you will have learned how to build more complex environments by building a cooperative and competitive multi-agent ecosystem.
What you will learn
- Develop Reinforcement and Deep Reinforcement Learning for games.
- Understand complex and advanced concepts of reinforcement learning and neural networks
- Explore various training strategies for cooperative and competitive agent development
- Adapt the basic script components of Academy, Agent, and Brain to be used with Q Learning.
- Enhance the Q Learning model with improved training strategies such as Greedy-Epsilon exploration
- Implement a simple NN with Keras and use it as an external brain in Unity
- Understand how to add LTSM blocks to an existing DQN
- Build multiple asynchronous agents and run them in a training scenario
Who this book is for
This book is intended for developers with an interest in using Machine learning algorithms to develop better games and simulations with Unity.
The reader will be required to have a working knowledge of C# and a basic understanding of Python.
Frequently asked questions
Information
Terrarium Revisited – A Multi-Agent Ecosystem
- What Terrarium was/is
- Building the Agent ecosystem
- Basic Terrarium – Plants and Herbivores
- Carnivore: the hunter
- Next steps
- Exercises
What was/is Terrarium?
Original Microsoft Terrarium
Attributes | Herbivore | Carnivore | Description |
Max Energy | 20 | 10 | Determines the amount of energy the creature can store for actions. Carnivores consume energy by eating other creatures. Herbivores eat plants. |
Eating Speed | 2 | 6 | Determines how fast the creature can consume energy from another creature. |
Attack Damage | 0 | 14 | Amount of damage another creature causes in an attack. |
Defend Damage | 10 | 10 | Determines how effective a creature defends from an attack. A creature with a higher defense will inflict damage back on the attacker. |
Max Speed | 8 | 10 | Determines how fast a creature moves. |
Camouflage | 25 | 5 | How difficult it is to see the creature. |
Eyesight | 5 | 20 | How far away a creature can detect other creatures. |
Mature Size | 30 | 20 | We are adding Mature Size to the original parameters in order to hopefully make the game more balanced. |
Growth Rate | 5 | 5 | This is another parameter that has been added to manage creature growth a little cleaner. The original game handled creature growth a bit like a black box. |
Event | Reward | Description |
Die of old age | +1 | Our goal will be for the creature agents to survive as long as possible. |
Reproduce | +1 | We want to encourage reproduction; more agents means more learning and food for others. |
Eat | +energy eaten/100 | We give this micro reward in order to encourage creatures to eat. Without it, they may realize they don't need to do this and just continually die of starvation. Besides, everyone enjoys e... |
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
- Introducing Machine Learning and ML-Agents
- The Bandit and Reinforcement Learning
- Deep Reinforcement Learning with Python
- Going Deeper with Deep Learning
- Playing the Game
- Terrarium Revisited – A Multi-Agent Ecosystem
- Other Books You May Enjoy