What Is AI?
Artificial intelligence and games go together like peanut butter and jelly, mac and cheese, or whatever perfect food combination metaphor works best. Without artificial intelligence, games we love wouldn’t even be functional.
How long do you think that you’d be able to play the Witcher 3 with the monsters and humans not reacting to anything in the game world? It simply isn’t feasible.
That’s where artificial intelligence does a lot of heavy lifting. Since the 1950s, artificial intelligence in video games has played arguably the most significant role in gaming. Without artificial intelligence in games, there would be no arcade boom of the 1980s, Dark Souls, or World of WarCraft.
Always looking to improve upon good things, Unity is at the forefront of newer and more impressive AI practices in its engine. They put a strong emphasis on artificial intelligence, continually updating their Unity ML-Agents program.
Let’s explore more about Unity AI.
What is AI in Unity?
Unity has a fantastic program dedicated to immersive and comprehensive artificial intelligence. They have developed some tremendous artificial intelligence not only in games and applications but for everyday life.
How Do You Make An AI in Unity?
You may have a preconceived notion that developing proficient AI in Unity may be for experts only. Luckily, you’re wrong there.
Unity is an extremely streamlined and impressive game engine, and they always strive to make game development more straightforward and seamless.
To start your Unity AI journey, simply start a new project, create a game scene populated with different objects, and assets.
Next, you are going to need to know how to code. You don’t need to be an expert by any means, but you need to have a basic understanding of your C-like languages’ functions. Unity AI mainly uses C# for coding.
AI for Beginners
Introduction to AI Levels
Not all AI levels are created equal. There are three primary levels of artificial intelligence: narrow, general, and strong AI. Let’s see what each offers the field of computing and gaming.
Narrow AI, otherwise known as weak AI, is focused on a smaller task. This form of AI is a good test of AI capabilities, but wouldn’t serve the game or computer program in any truly meaningful way.
Some famous examples of narrow AI are our dependable computer companions Siri and Cortana. These forms of artificial intelligence serve only a few functions, and can’t properly function outside of their essential tasks that are all pre-determined.
Jeff Kearns, a writer for Machine Design, describes narrow AI as having a preprogrammed purpose:
“This categorization seems to be rooted in the difference between supervised and unsupervised programming. Voice-activated assistance and chess programs often have a programmed response. They are sensing for things similar to what they know and classifying them accordingly. This presents a human-like experience, but that is all it is—a simulation.”
General AI and The Turing test
“… what we want is a machine that can learn from experience.” – Alan Turing
General AI, known as AGI, is more or less the potential for any machine to be able to learn anything a human can. General AI is reserved for describing the potential for a machine’s thought process, and that they can experience many of the same cognitive functions that we do.
Reasoning, logic, planning, communication, and learning are fundamental concepts of general AI and what is possible with machines.
While general AI isn’t as widespread as something like machine learning and strong AI, it has the potential to become the status quo in several years.
You may have heard of something called the Turing test (or imitation game), named after scientific and mathematical genius Alan Turing, is a particular test in which computers imitate human thoughts, speech, and reasoning skills to potentially fool other humans.
This is a fantastic display of what AI is capable of, as computers that have been put to the Turing test has succeeded continuously in fooling those who determine if they are a machine or not.
The Turing Test is made up of three different parties: a piece of artificial intelligence, a regular person, and the evaluator who determines who is the machine and the other a human. The computer uses and mimics human-like responses to fool the evaluator. If the machine remains undetected by the evaluator, it will have passed the Turing test.
Where narrow AI is more or less a detailed simulation at the best of times, strong AI is what we are most used to. Strong AI is probably the closest thing we will get to a brain in computers.
On the surface, it seems similar to Alexa or Siri. with these applications and pieces of technology, there’s a preprogrammed, simulated response, a piece of strong AI will have a general idea and execute it based on a concept, rather than concrete details.
Jeff Kearns talks about how:
“…an AI program taught itself to play 49 classic Atari games. When the program was instructed to obtain the highest score it could in the game Breakout, it was able to outperform humans in just 2.5 hours. Researchers let the program continue, and to their surprise, the program developed a strategy that was not programmed into the system.”
We often see forms of strong AI in science fiction movies and video games. Blade Runner, the 1982 classic by Ridley Scott, goes into deep themes about what makes something human.
Could something with advanced (or strong) AI be considered human? While narrow AI more or less puts on a performance, strong AI brings up many more profound questions that we still grapple with today.
Machine Learning vs. AI: What’s the Difference?
Chances are that this is the form of computer intelligence one thinks of when thinking of robots, androids, games, computers, and more.
Artificial intelligence is simply defined as intelligence displayed by machines. It’s its own category, as it separates itself from the learning styles of animals and humans. Specifically, artificial intelligence begins with the programming of behavior.
Machine learning is the concept of a machine using different algorithms to continue to learn something.
For example, a computer could have an algorithm that would allow it to access individual pieces of data and learn more and more about a subject. Artificial intelligence is limited by the scope, (narrow, general, and strong), machine learning gives more learning opportunities to machines and programs.
Machine learning emphasizes the practice of machines being able to access certain information all by themselves and use it for education.
Deep learning, or deep structured learning, is a subset of machine learning in which the machine is able to mimic essential functions of the human brain.
Direct machine learning may be able to recognize certain aspects of an image, while machines engaged in deep learning could potentially identify more abstract concepts surrounding the image in question.
Now that we know the differences between artificial intelligence vs. machine learning let’s delve deeper into the different types of machine learning.
Becoming the New Normal
Machine learning is becoming more and more common in our technological landscape. It can seem like a complicated subject, especially to the uninitiated.
In the interest of keeping things exciting and comfortable, let’s break down the three main types of machine learning and how they tie into gaming and our own futures.
Supervised machine learning is the main form of machine learning. In supervised learning, the machine has a preexisting label to work with, remaining within the parameters of what it can learn.
“…a labeled dataset of flower images would tell the model which photos were of roses, daisies, and daffodils. When shown a new image, the model compares it to the training examples to predict the correct label.”
Unsupervised learning is a branch of machine learning with a minor level of human involvement. This is where the impressive side of machine learning shines. The machine looks for previously unknown data and learns it, all without the assistance of humans.
Think of what we experience most in video gaming. What happens when you complete a challenging level or defeat a tough boss? Usually, we receive benefits of some sort. It could be an achievement, trophy, or in-game rewards like great loot.
Now substitute us for AI bots and assets. Reinforcement learning’s biggest goal is to have AI aspects attempt to achieve goals of their own. When completing a goal set out before them, they are then rewarded.
As with our puny little human brains, the machine will constantly learn from its mistakes and eventually attempt to get better and better.
The machine impressively remembers past iterations of its actions. Once again, they mirror us in their recall of memories. They use the feedback and past experiences in a specific task to better improve upon their performance.
Think of self-driving cars or even robotics. To better improve upon a machine’s systems, they will engage in reinforced learning to enhance their performance.
Using AI vs. Machine Learning Interchangeably
Although it may seem like a simple answer, that may be the tech companies use both as catch-all umbrella terms, it actually has to do with hype. Artificial intelligence experienced an ‘AI Winter,’ where the hype and attention to artificial intelligence were seriously waning.
Using the term ‘machine learning’ evokes a more modern, impressive way of machines acting with autonomy. This is exhibited through tech companies stating that individual computer systems don’t use AI when they actually do.
How to Make Your First Unity AI project
Setting the Stage for Unity AI
To start, click on ‘new’ from the menu to begin your Unity AI journey.
To make things easier, go ahead and name your project ‘AI’ for reference. Check the 3D option of the two options and finally click ‘create project’ at the screen’s bottom.
This is where your coding knowledge will come in. Writing scripts for the different objects and assets in your Unity project will depend on how well you know your C-like languages (C++/C#). You will begin coding in the Visual Studio portion of Unity.
To move your chosen asset around a scene, you need to enter the applicable code. To do this, get familiar with some of the critical functions of scripting with Unity AI.
- And if
All of these commands will help connect your various coding together to create a Unity AI scene. You will start with a Rigidbody. “Adding a Rigidbody component to an object will put its motion under the control of Unity’s physics engine.”
Unity AI and Its Role in Automation
Unity is used by different tech companies. They praise Unity AI for its excellent optimization, as well as its diversity and possibilities. It’s a veritable playground of development, machine mastery, and more.
The Unity workflow is tried and true, helping tech clients with a robust system that utilizes the fantastic Unity asset store and broad appeal.
We could very well see Unity being used in the future by a majority of tech companies to apply artificial intelligence and machine learning needs.
Regardless, machine learning will only become more and more impressive as the years go by. Who knows, maybe the Turing test will become a commonplace thing in testing the validity and effectiveness of computers worldwide.
Either way, Unity AI is at the forefront of this artificial intelligence revolution.