0

Getting Started with Deep Learning

Posted by Dr. Burton on May 15, 2017 in Cloud Computing, Deep Learning, Lua |

Why Deep Learning?

Several months ago one of my former students, Dr. Julia S. Slige, began posting a series of tutorials on using R for data mining.  Julia even has a book on the topic published by O’Reilly.  Her posts and subsequent research got me to thinking about Deep Learning, a key part of my ongoing research into adaptive/immersive learning using game engines.

As a result of these musings, I have begun the process of learning to use the latest Deep Learning tools so as to enter this next phase of research.  As I like to share what I am learning, writing/blogging, as Bruffee (1999) postulates, helps to maintain the conversation that is learning.  I will be recording my musings and what I have learned along the way.  Who knows, it might even result in another textbook (that is how all of my previous textbooks got their start).

One of my goals as I share what I have learned is to make it easier for those who follow the path that I am blazing.  This is still early days of AI, Deep Learning, Machine Learning and lots of similar buzz words.  It can be confusing and overwhelming to make sense of it all so that you can apply the concepts to what you are interested.  Hopefully, after reading these blogs, it will be a little less confusing.

 

What is Deep Learning

There is a great deal of hype and excitement around Artificial Intelligence, Machine Learning, Neural Networks, and Deep Learning.  Unfortunately, the terms are frequently being used interchangeable which only adds to the confusion.  Please understand that each description below is a broad generalization.  Each of these areas is immense with many methods and theories. So before we go any further, let’s agree on the general terminology:

Artificial Intelligence
Artificial Intelligence or AI as it is commonly referred to, is the catch-all term for anything related to AI.  You’ve seen the movies; robots and computers that are able to interact and learn from their environments to accomplish their mission, some bad (Terminator, HAL), some helpful (R2D2), some annoying (C3PO).
The goal AI is to create software that learns as it interacts with the environment. At this time, implementations of AI are very narrow and specialized for specific fields. AI includes the subdomains of Machine Learning, Neural Networks, and Deep Learning. While AI has been around for years, only with the recent availability of cloud-based computing are the resources available to begin to simulate AI.

Machine Learning
Machine Learning (ML) relies upon algorithms to parse data, learn from the data, then make a prediction based upon the data.  ML systems are ‘trained’ using a lot of data (and I mean a LOT of data) to make accurate predictions.  You are probably already using ML in your everyday life: Spam filtering!  If you use a cloud-based email system such as Gmail, then you are using ML.  Have you noticed that the first time you receive a message that is probably spam, it goes into your inbox, but after that, similar messages go straight to your spam folder.  Gmail learns from you, based on your telling it what is spam and what isn’t.

Neural Networks
Neural Networks (NN) builds on ML.  The concept is that just as the human brain uses neurons to pass information, neural networks can create pathways that show lead to the correct answer more quickly.  ML makes a lot of mistakes as it is learning.  Neural Networks learn more quickly because a weight or value is given to paths that result in the correct answer.  These paths are stored in hidden layers.
Neural Networks are very processor intensive, even more so than ML.  Only with the advent of parallel processing and GPUs have Neural Networks begun to accomplish what they are capable of doing.

Deep Learning

Deep Learning (DL) combines ML and NN to accomplish the next phase of AI. By using sets of algorithms that are then layered.  Deep Learning is different from Neural Networks in that it uses more layers in the building of learning paths. Additionally, Neural Networks are usually supervised as they learn.  Deep Learning can be supervised or unsupervised (or a combination) as it goes through it’s learning process.  At this time Deep Learning is providing exciting advances in optical recognition i.e. read a stop sign, process natural language, speech systems, translations, even adding closed captioning to YouTube videos.

 

Why Focus on Deep Learning?

Why will I be skipping over implementations of Machine Learning and Neural Networks?  It comes down to goals.  While I will be sharing certain aspects of ML & Neural, the aspects of AI that I am interested in are concentrated in the Deep Learning domain.
My research is focused on creating immersive educational environments that individualizes instruction based on student performance.  My wife, Rosemary, and I created one of the first fully online schools back in the 90’s.  Our continued research and interest in game design, gamification, and now Deep Learning, are all focused on building a better, pedagogically superior, learning experience for all learners, regardless of location, background, disabilities, language, or previous experiences.

 

Programming Languages and Tools for Deep Learning

AWS/Google/Microsoft Azure/IBM Bluemix
All major cloud companies are trying to stake their claim in the AI field.  Each has slightly different offerings and tools (and pricing for those tools).
I have received research funding in the form of free access to the cloud infrastructure (no real money actually received) for each of the four mentioned companies for cloud computing over the last 5 years.
I have settled on using Amazon AWS for my personal and research work.  While the services, cost, and resources do not vary that much from company to company, Amazon’s customer-centric nature clicked with how I like to do things, thus that is where the majority of my time and energy has been spent.  Also, AWS supports both Lua Torch and Python Theano, the two dominant tool sets that we will be (at least intially) exploring.

Lua
I have to admit, I was excited to see that there was a Lua tool set for Deep Learning.  I have been developing with Lua for over 15 years and used it intensely for the last 7 years.  If you haven’t seen my Lua tutorials on Youtube, they can be found here.
The dominant tool in Lua is Torch.  It is considered a very flexible tool that keeps the easy of use of Lua.

 

Python Theano
Python seems to have broader support (and many tools) than Lua in deep learning.This might be caused by Python is in wider general use than Lua, which naturally makes it more attractive.
The dominate tool is Theano.  While there are many others in development and gaining in popularity (most notably Cafe2), Theano remains the primary Python Deep Learning tool.

 

Other languages:
R and Julia are also being used for deep Learning but do not appear to have the depth of support Lua and Python enjoy at this time.
Deep Learning is still relatively young as far as tools.  There are a lot of things in development, but from my research, The lead tools in Deep Learning are Lua Torch and Python Theano, so that is where I will be concentrating my efforts at this stage.

 

Next Steps

Now that we have an idea of what Deep Learning is and a few simple examples of what it is capable of doing, I will be exploring the tools.  In my next blog post, we will take a closer look at Python Theano and Lua Torch.

While I lean toward Lua and Torch just because of long familiarity, I don’t want to make the mistake of passing on a better set of tools due to familiarity.  Since this is a new skill set that I am learning, if I need to improve my Python skills to maximize success, I am very willing to do so.

Next:  Lua Torch v. Python Theano

References:
Bruffee, K. A. (1999) Collaborative learning. John Hopkins University Press
Slige, J. S. & Robinson, D. (2017) Text mining with R: A tidy approach.  O’Reilly Media

Slige, J.s. (2016) Data science-ish (blog)

Tags: , , , , , , ,

0

Update on Game Development Fundamentals with Amazon Lumberyard

Posted by Dr. Burton on April 28, 2017 in Amazon Lumberyard, Education, Game Development, Lua, Lumberyard |

Game Development Fundamentals with Amazon Lumberyard will available soon!

Early this year we provided an early release copy of the textbook to a small group of students.  We received some very valuable feedback on how to make the textbook even better, especially in how we approach teaching Blender.

As we were completing the changes, Dr. Burton had the opportunity to visit with several Lumberyard Engineers at GDC.  After spending time with them, discussing the next version of Lumberyard, and getting to see the next beta release, we decided that the changes between 1.8 and 1.9 were significant enough that we should delay our release until 1.9 was available.

Amazon Lumberyard 1.9 is now available and we are working hard to update the entire book to be compatible with this important release.
While Lumberyard continues make significant improvements with every release (usually 6 to 8 weeks between each update), we believe that the core functionality of Lumberyard is now at a place where we can release our textbooks and it not be outdated in 6 weeks.

A few notes:
We WILL continue to update the Lumberyard textbooks FOR FREE to our customers.  We generally release an update 2 to 4 times per year depending on how dramatic the changes.  By purchasing the textbooks through our website, you will receive first notice to all updates.  All textbooks will also be available through Amazon and Apple bookstores.  We will release the updates to customers who purchase through those stores, but we have no control over how quickly the new material will be available to their customers.

Faculty who are interested in using our textbooks for a class or would like a review copy, please contact sales@burtonsmediagroup.com and we will be happy to assist you!

We currently have at six textbooks planned in the Lumberyard series, each covering a different style of game with a different target age group or experience level.

Textbooks In Development:
Building a Casual Game: Plinko
Making a Maze Runner
Racing Game
Multiplayer Combat
Multiplayer Worlds

 

Tags: , , , , , , ,

0

Why switch to Amazon Lumberyard?

Posted by Dr. Burton on April 28, 2017 in Cloud Computing, Game Development, Lumberyard, Mobile |

 

Recently I was asked why I had selected Amazon Lumberyard over Unity, Unreal or other 3D game engines.

 

There are several reasons I chose to go with Lumberyard.

Cost:
Unity:
I had been using/teaching Unity for years (I was one of the recipients of the Unity Education Grant in 2010).  It is fairly easy to use and teach.  However, it was expensive to use in the classroom (I realize that this isn’t an issue now that Unity is free for education).  However, if one of my students (or I) am successful in making a popular game, there is a cost going forward.  I’m okay with paying a little bit and supporting the makers of the engine that I use, so this was not a big issue but was still a consideration.
Unreal:
Yes, Unreal has been/is free for education.  However, their royalty structure for a semi-successful game is a little frustrating and expensive.  Again, I do not have a problem paying a little if my game is successful, but I generally avoid royalty structures (unless I’m the recipient :-).
Lumberyard:
Lumberyard is completely free.  They make their money off of web services, which you have to pay for with any game engine.  I was already using AWS, so when AWS was built into Lumberyard, this was an easy decision.  I know, AWS plugins are now available for other engines as well, so this wasn’t the tipping point but it did contribute.  Amazon has deeper pockets than other game engine makers.  Amazon is making and publishing their own games with Lumberyard.  Of course, if your game doesn’t use web services (i.e., it’s single player) it’s completely free.
Responsiveness/Support:
Note:
  I expect a certain level of professionalism.  I run a game design degree that is ranked in the top 20% internationally.  I realize that I’m not at a big name university, but a cordial, polite response to my questions is expected no mater how big the organization.
Unity:  As I said, I used Unity for over 7 years.  The responsiveness of the company to my questions and attempts at interaction was.. let’s just leave it at disappointing.   The only time I would get a response was on selling more licenses.
Unreal:  I never received more than a form letter response from Unreal.
Lumberyard: This was the big difference.  One of the big influences to shift to Lumberyard was how I was treated by the people at Amazon Lumberyard compared to other game engine companies.  Amazon has built its reputation on being customer-centric.  This philosophy was immediately apparent the first time I reached out to the support staff.
Soon after that initial email, I was speaking with engineers, developers, and even the head of one of the divisions at Amazon.  Amazon even sent one of their people to spend the day at the University I teach to give a series of tech talks and game dev talks to my students.  When compared to how other companies treat education, this was the deciding factor.  I love Amazon’s customer-centric focus.

Access to Engine code

For most indie developers this isn’t a big factor.  But if you have a HUGE project that you plan to span the next 20 years of your life (yes, I have project that I am working on that meets this criteria) then the availability of the engine code could be critical.  What if the company goes out of business?  What if they go left when you need to go right?  While I do not have any interest in being in the ‘making game engines’ business, it could be an issue long term.

Unity:  Can be purchased.
Unreal: Available for download with a very friendly EULA.
Lumberyard:  Open-Source-ish.
Scripting:
Unity: Scripting in Unity can be done with C# (as I understand it, javascript is being depreciated?).  There are a few other languages as well, but C# is the one that most people use.Unreal: Default scripting is C++.  While this is great if your students are computer science majors, it’s a problem if you’re focused on game design.

Lumberyard: Default scripting is Lua.  Yep, Lua, the same language that we use for mobile game development with Corona SDK.  Learning Curve: 0

All three engines also include a visual scripting tool to simplify it even more for the non-programmers.
Networking/Cloud:
Unity:  This has been a weakness of Unity for years.  While it has become significantly easier in the latest version, if I were to stay with Unity, I would still use the AWS Cloud plugin.
Unreal:  This was the Unreal engines strength.  They got networking right early on.  You still need the background servers to host the game.
Lumberyard: Lumberyard includes Gems that make creating multiplayer/Internet games easy to integrate.  In the latest version, it is advertised that one engineer can have the entire backend up and running in 30 minutes.  Less experienced developers might take a little longer.
Learning & Resources:
Unity:  This is where Unity shines. They have created some really great resources for helping people to learn Unity.  Part of that was the early investment in education (the Unity Education Grant). The learning curve on Unity is about as easy as you can get with 3D game creation.  Add in the Asset store, and Unity has done a great job that all engines should aspire.
Unreal:  Unreal’s learning curve is pretty steep. The asset store now exists but isn’t as developed as Unity.  Learning resources exist but again, not as developed as Unity.
Lumberyard: This is where Lumberyard has to play catch-up (and one of the reasons I’m writing a textbook).  There are plans for asset stores (come on, it’s Amazon.. there will be asset stores) and the basic documentation is there, but the easy to follow for people new to 3D game dev is lacking.
Be sure to check out our new books on learning Amazon Lumberyard to make this a little less painful!
Virtual Reality:

This area is a toss up between the big three engines.  Each implements VR slightly differently, but all have made it easy to do.

Supported Platforms:
Unity: Is there a platform that Unity can’t publish to?  This is an area of strength for Unity 3D.  Publishing is easy and straight forward.
Unreal: Like Unity, Unreal can publish to just about everything.
Lumberyard is only short on being able to publish to HTML5.  As long as you aren’t targeting a browser, this shouldn’t be an issue.
Going forward:

For the University game development program and my personal use, we are going 100% in on Lumberyard.   The engine is better (IMHO) for game dev, the cost is perfect, and the company is large enough that I don’t have to worry about if it exists in the future.  With the added bonus that I get the engine source code so that I can continue to tweak it if they do decide to stop development, I have a path forward.

Hope that helps!  Please, let me know if you have any other questions or thoughts on the matter!
Dr. Brian Burton

Tags: , , , ,

0

Learning Lua Scripting- Part 5 – Math and Math Library

Posted by Dr. Burton on March 15, 2017 in Amazon Lumberyard, Corona, Lua, Lumberyard, Tutorials |

In this Learning Lua Scripting tutorial we will examine how to use the Lua Math Library.

Lua has the basic math operations that you would expect to find in a modern scripting language.
^ – exponential
* – multiplication
/ – division
% – modulus or modulo
+ – addition
– – subtraction or unary

As of version 5.3 of Lua, numbers are stored internally as either integers or double (64 bit) by default.
Prior to 5.3, all numbers were stored as doubles.

Lua follows the standard order of precedence for operations: ^, not, #, unary, *, /, %, +, –

Library:
The math library can be accessed with the math keyword without special loading:

local myPi = math.pi
print ( myPi )
									


Results in 3.1415926535…

The math library has all the functions that you would expect including sin, cos, random, randomseed, etc.

If you wish to generate a random number, be sure to randomize the number generator:

math.randomseed( os.time( ) )
myNumber = math.random( 1, 10 )
print ( myNumber )
									

Resources

If you would like print resources, there are several books on Lua available.

Programming in Lua by Roberto Ierusalimschy, one of the lead architects of Lua.  Great technical intro to the language

Lua 5.2 Reference Manual also by Roberto Ierusalimschy, is, as the name implies, a less expensive reference manual.  Useful for the experienced coder who just needs to look up some of the details of the language.

Lua Programming Gems by L. de Figueiredo, W. Celes, and R. Ierusalimschy is an older (2008) collection of code snippets that can be useful.


Editor –

We used the Zerobrane editor in all of our video demonstrations.

Our books:
We have several books on Corona and Amazon Lumberyard (both of which use Lua as their scripting language):
Learning Mobile Application & Game Development with Corona – Learn to program in Lua and how to make mobile apps! eTextbook for those who are new to programming.

Beginning Mobile App Development with Corona – Introduces mobile application development for those who already know how to program.

Game Design Fundamentals with Amazon Lumberyard – For those who are new 3D Game development, this eTextbook introduces how to make a game using Blender, GIMP, and Amazon Lumberyard.

The idea of writing a textbook on the Lua Scripting language has been floated to me.  While I greatly value Dr. Ierusalimschy, our styles of instruction are very different.  Leave me a comment if you would like to see a Lua Scripting textbook.

 

Next Lesson: Part 6 – Functions

Tags: ,

0

Learning Lua Scripting- Part 4: Working with Strings

Posted by Dr. Burton on March 14, 2017 in Amazon Lumberyard, Corona, Lua, Tutorials |

In this tutorial, part 4 of our series on learning Lua scripting, we will look at some of the tools available for working with Strings in Lua.

Tutorial:

Concatenation in an important concept in all programming languages.  In Lua, concatenation is accomplished by using two periods in a series or ..

local myString = "Hello"
print (#myString)  -- the # (hashtag or pound sign) returns the number of elements in a table or string. i.e. how many characters are in the string

local myOtherString = " World"
print (myString .. myOtherString)
									

There are many escape sequences available in Lua including newline:

local myNewLine = "This is a string ntwith a "newline""
print (myNewLine)
									

The example adds a new line (\n), a tab at the beginning of the newline (\t), and quotes around the word “newline”.  One caveat to using escape sequences; they do not require any spaces around them.

One last tip for creating strings in Lua.  If you want to create a multi-line string, you can use [[ ]] to encapsulate the string.

local myThirdString = [[ Multi-line
string
that 
contains 
newline ]]
print (myThirdString)
									

 

Resources

If you would like print resources, there are several books on Lua available.

Programming in Lua by Roberto Ierusalimschy, one of the lead architects of Lua.  Great technical intro to the language.



Lua 5.2 Reference Manual
also by Roberto Ierusalimschy, is, as the name implies, a less expensive reference manual.  Useful for the experienced coder who just needs to look up some of the details of
the language.

Lua Programming Gems by L. de Figueiredo, W. Celes, and R. Ierusalimschy is an older (2008) collection of code snippets that can be useful.


Editor –

We used the Zerobrane editor in all of our video demonstrations.

Our books:
We have several books on Corona and Amazon Lumberyard (both of which use Lua as their scripting language):
Learning Mobile Application & Game Development with Corona – Learn to program in Lua and how to make mobile apps! eTextbook for those who are new to programming.

Beginning Mobile App Development with Corona – Introduces mobile application development for those who already know how to program.

Game Design Fundamentals with Amazon Lumberyard – For those who are new 3D Game development, this eTextbook introduces how to make a game using Blender, GIMP, and Amazon Lumberyard.

The idea of writing a textbook on the Lua Scripting language has been floated to me.  While I greatly value Dr. Ierusalimschy, our styles of instruction are very different.  Leave me a comment if you would like to see a Lua Scripting textbook.

 

Next Lesson: Part 5 – Math and Math Library

Tags: , ,

Copyright © 2010-2017 Burtons Media Group All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.