Learn Unity ML-Agents Fundamentals of Unity Machine Learning
Incorporate new powerful ML algorithms such as Deep Reinforcement Learning for games
Micheal Lanham
BIRMINGHAM - MUMBAI
Learn Unity ML - Agents - Fundamentals of Unity Machine Learning
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Kunal Chaudhari
Acquisition Editor: Reshma Raman
Content Development Editor: Roshan Kumar
Technical Editor: Shweta Jadhav
Copy Editor: Safis Editing
Project Coordinator: Hardik Bhinde
Proofreader: Safis Editing
Indexer: Rekha Nair
Graphics: Jason Monteiro
Production Coordinator: Shraddha Falebhai
First published: June 2018
Production reference: 1290618
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78913-813-9
www.packtpub.com
To my mentors, Dr. Peter Daly, Pat McLellan, and Uncle Herb (Ewing), for their support and guidance
Micheal Lanham
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and, as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Micheal Lanham is a proven software architect with 20 years' experience of developing a range of software, including games, mobile, graphic, web, desktop, engineering, GIS, and machine learning applications for various industries. In 2000, Micheal began working with machine learning and would later use various technologies for a broad range of apps, from geomechanics to inspecting pipelines in 3D. He was later introduced to Unity and has been an avid developer and author of multiple Unity apps and books since.
This book would not be possible without the efforts of the machine learning team at Unity, especially Dr. Danny Lange and Dr. Arthur Juliani.
Thanks to the editorial team at Packt for their assistance and support of my vision for this book. They, and the dedicated hardworking reviewers, make these books possible. I would also like to thank my home support team of Rhonda, my children, and my mother.
About the reviewers
Michael Oakes has worked in the IT industry for over 18 years and is a graduate from the University of Westminster and a Unity Certified Developer.
He is currently working as an augmented/virtual reality consultant and AI developer with a Canadian mobile company, and with his own company, Canunky Solutions, developing custom augmented/virtual reality and AI applications. Originally from Grimsby in the UK (home to his beloved Mariners football team), he now lives in Calgary, Canada, with his wife, Camie, and two cats (Peanut and Sammy).
Casey Cupp is a software developer with a focus on customer-based problem solving using full-stack technologies. He has worked on sustainable development in multitier data applications with an emphasis on utilizing GIS and machine learning technologies. He is the Lead Developer for Petroweb in the oil and gas data management industry, and a senior developer for Sales Temperature, a machine learning start-up in retail forecasting.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Table of Contents
Preface
Machine learning (ML) has been described as the next technological wave to hit humankind, akin to that of electricity. While this is a big claim, we can make certain analogies between the two technologies. For one, you really don't need to understand the inner workings of electricity to use it, and in some ways that applies to ML and many of the more advanced concepts. If you wire up a light the wrong way, it won't work, or you could hurt yourself, and the same analogy applies to machine learning. You still need enough knowledge to call yourself an MLtician or ML practitioner (if you will), and it is the goal of this book to give you that depth of knowledge. Now, the area of ML is broad, so our focus in this book will be to use deep reinforcement learning (DRL) in the form of Unity ML-Agents. DRL is currently a hot topic for developing robotic and simulation agents in many areas, and it is certainly a great addition to the Unity platform.
Who this book is for
This book is for anyone who wants a good practical introduction to some specific ML technologies that work and are very fun to play with. While this book covers some very advanced topics, anyone with a high-school level of math, patience, and understanding of C# will be able to work through all the exercises. We do feature example Python code and use Python for most of the training, but only a superficial knowledge of the language is required.
What this book covers
, Introducing Machine Learning and ML-Agents , covers the basics of machine learning and introduces the ML-Agents framework within Unity. This is basically just a setup chapter, but it's essential to anyone new to Unity and/or ML-Agents.