Neural Networksin Unity C# Programming for Windows 10 Abhishek Nandy Manisha Biswas Neural Networksin UnityC# Programming forWindows 10Abhishek NandyManisha BiswasNeural Networks in Unity Abhishek Nandy Manisha Biswas Kolkata, West Bengal, India North 24 Parganas, West Bengal, India ISBN-13 (pbk): 978-1-4842-3672-7 ISBN-13 (electronic): 978-1-4842-3673-4 https://doi.org/10.1007/978-1-4842-3673-4 Library of Congress Control Number: 2018951222 Copyright 2018 by Abhishek Nandy, Manisha Biswas This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made.
The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Celestin Suresh John Development Editor: Matthew Moodie Coordinating Editor: Aditee Mirashi Cover designed by eStudioCalamar Cover image designed by Freepik (www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail rights@apress.com, or visit www.apress.com/ rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-3672-7. For more detailed information, please visit www.apress.com/source-code. Printed on acid-free paper This book is dedicated to my parents.Abhishek NandyThis book is dedicated to my parents andthe spirit of Women Techmakers.Manisha BiswasTable of Contents v Table of Con T T able of Con enT en s vi About the AuthorsAbhishek Nandy is B.Tech in IT and he is a constant learner.
He is a Microsoft MVP for Windows Platform, Intel Black Belt Developer as well as Intel Software Innovator. He has a keen interest in AI, IoT, and game development. He is currently serving as an Application Architect in an IT firm as well as consulting on AI, IoT and doing projects on AI, ML, and deep learning. He also is an AI trainer, driving the technical part of the Intel AI Student developer program. He was involved in the first Make in India initiative, where he was among top 50 innovators and got trained in IIMA. Manisha Biswas is B.Tech in Information Technology and currently working as Data Scientist at Prescriber360 in Kolkata, India.
She is involved with several areas of technology including Web Development, IoT, Soft Computing, and Artificial Intelligence. She is an Intel Software Innovator and was also awarded the SHRI DEWANG MEHTA IT AWARDS 2016 by NASSCOM, a certificate of excellence for top academic scores. She is the founder of WOMEN IN TECHNOLOGY, Kolkata, a tech community to empower women to learn and explore new technologies. She always likes vii abou a T bou The a he u a T u hors to invent things, create something new, or to invent a new look for the old things. When not in front of her terminal, she is an explorer, a traveller, a foodie, a doodler, and a dreamer. She is always very passionate to share her knowledge and ideas with others.
She is following her passion and doing the same currently by sharing her experiences with the community so that others can learn and give shape to her ideas in a new way. This led her to become Google Women Techmakers Kolkata Chapter Lead. viii About the Technical ReviewerAli Asad is an avid programmer with experience in various areas, including gameplay programming, custom add-in/ tool/plugin development, computation programming, artificial intelligence, consulting, and formulating strategies. His career has covered the life cycle of application across different domains, such as AEC industry and Education. He authored a book The C# Programmers Study Guide (MCSD). Hes also a Microsoft Specialist: Programming in C#.
You can learn more about his various other activities at: www.linkedin.com/in/imaliasad/ ix Introduction This book is an attempt to cover Unity with an approach to touch machine learning and neural networks. We have given a brief introduction to useful neural network terminologies to start with. The attempt has been made to use the new Unity-ML-Agents version 0.3 and clearly construct the process. What do you need? A basic understanding or fresh approach to cover the Unity engine with respect to ML and Neural Networks. We have kept things simple to adapt. xi CHAPTER 1Neural NetworkBasics The evolvement of artificial intelligence, machine learning, and deep learning has made so many people start asking questions about what exactly the process of machine learning actually is? We found that data scientists, enthusiasts, and developers are very curious to learn how a neural network works for helping artificial intelligence to perform better.
In this chapter, we will look at the neural network as a whole and touch on some common terminologies associated with it. The chapter starts with an explanation of neural networks. Then, we move along to defining what exactly a perceptron is, with a brief introduction to it. Further, we will compare a single-layer neural network with a multilayer neural network, emphasizing the structure of the neural network. In the subsequent section, we will look at the various activation functions available. Next, we will define bias and weight and describe why they are useful.
Next page