Artificial Intelligence (AI) Technology in Games

AI (Artificial Intelligence) is the talk of the day in the Gaming Industry. Let’s take a look at what AI is technology and how it originated. The idea of AI had evolved much earlier. People always wanted to have a world completely filled with automated robots which would do everything for them without asking any instructions. Say for example that the temperature and humidity of the house has increased to such a limit that using a fan becomes mandatory. In such cases a program is simulated in the control panel of a switch board which keeps on checking the temperature, humidity of the room, etc and takes important decisions regarding switching on the fan, increasing its speed, decreasing its speed, Etc. And this is exactly what AI is about. AI is nothing but a simulation of a human brain into a computer. AI technology was invented so as to produce robots, machines and games which are much similar to the human brain in their functioning.

All this has become true because of the use of Soft Computing Techniques and AI. Imagine a system which if fed with the climate conditions and the data of the power system load for a year or so along with the temperature conditions at that particular time. The system takes a look at the previous load data and estimated how it changes along with change in the weather. Once simulated this system is so effective as to give a fuzzy estimation of the load data that will be required during a day, provided you feed the weather conditions of the present day to the system through another system. This process is actually called as load forecasting and is usually done using soft computing techniques. What we call as Artificial Intelligence is just a small part of Soft Computing Techniques.

But, why did I give this example? Just to tell that the basic level AI technology used in Games is used at a much higher level in Engineering Technologies. There are various soft computing techniques which are used for doing various automated works. Even the touch screen mobile that we use, employs these soft-computing techniques in order to detect hand writing input as given by the user with the help of a stylus. The same soft computing technology is used in a Game to tell the computer what a particular action of the player means. Have you ever thought how the bombs are simulated inside the computer? Let me take this as an example to tell you how the soft computing techniques are used in a Game.

Usually a game is a 3D area created inside the computer. All the buildings trees etc are the front-end. The softwares run in the backend and show a visual to you by taking the inputs from you. Say for example that you are driving a car. If you continuously hold down the front arrow key the car accelerates. The acceleration also depends on the slope of the road on which the car is moving. Actually the tricky part is in defining the trajectory traversed by a car when it jumps from the peak of a sinusoidal wave shaped road. When a bomb is thrown by a player it falls at a particular place. If I stand near to the bomb and die there will be no reality in my Game. So I will now tell the computer that in a real world situation the harm done to a human through a bomb blast depends on the distance between a person and the blast. So I take several circles of different radius and tell the computer that if the distance between the player and the bomb lies in a particular range the loss in health should be so much percent. Now I tell it the maximum distance till where the impact of the explosion is felt. Now the computer knows that if a person is nearer to the bomb blast, his health decreases more as compared to a person who is standing a bit far from it. This is what AI is about. But, this technology has a much wider view. You need to know you vector algebra and matrices right away if you want to become a Game developer.

Gaming is deeply related with mathematics. If you hate math you cannot become a good computer programmer. Game development needs a lot of math handling. But the actual fact is that most of the Game development process depends on designing. 90% of a game is pure designing. The coding part is the other 10%. In fact, most of the Game developers call themselves a graphics designer first and then a programmer. Writing game programs is definitely tedious. But, if you like developing Games it is not. Every time you add a piece of code you run the program just in order to see if everything works fine. Usually big games are cut into small parts and created by a team of professionals divided into small teams.

The main part used in very high quality reality FPS (First Person Shooter) Games is Fuzzy Logic. Fuzzy logic is nothing but a soft computing technique which utilizes a “Fuzzy” Logic. Usually computers use the language of 0’s and 1’s. It is either ON or OFF. But in Fuzzy Logic the weight-age given to an event is between this zero and one. If I use the 0 and 1 language it is either a person dies if he lies in the range of a bomb blast, or, I am alive if I am not in its range of blast. Using fuzzy logic and approximate reasoning is simulated by the programmer in the Game. If you can see the hand of a soldier standing in the other room, he does not see you (because the programmer tells the computer that you are hiding and hence you are not visible in the eyesight range of the soldier in the other room). You step one inch forward and the soldier knows that you are an intruder and starts shooting immediately till either of you die. And the eyesight of the soldier is designed by its programmer. This is fuzzy logic technology. Another Soft computing technique much widely used in developing Games is Artificial Neural Networks. Just as an electron leaves an atom if an energy greater than the threshold energy is applied to it, the neural network gets switched on as soon as the threshold value is exceeded by the input signal. But the feature that makes a Neural Network unique is its ability to learn. This means that it can actually learn different things and correct itself from its mistakes.

Say, we need to stop a car immediately if an accident is predicted. The neural network will use the estimation given by the programmer to stop the car. If the accident still occurs, the neural network takes the actual results, compares it with its predictions and calculates an error. Now the neural network will alter the time taken to stop the car in such a manner that the accident should also be avoided and the passengers in the car should also not get hurt due to a sudden brake applied to the vehicle. Sounds cool doesn’t it. Well. Using it in Game Development is even more cool if you know game programming.

Nowadays AI is seeing great improvements. The algorithms used by the Search Engines to do the indexing of a website in its index are also created using AI (actually soft computing). Artificial Intelligence is seeing great success in today’s cutting-edge technology. Good high-level programming languages like C# are used to simulate AI in a game. Game development is definitely a very cool technology and job to hang around with. Game developers work only five hours a day. The rest of the time, they either play the game or hang around the sity. The best part is that they get to play the game even while working in the office and even when they go to home. Programming a computer to produce an AI simulation game is great fun.


EnglishMinute.com

3 comments:

  1. Excellent post. Could you please tell me how games are designed. Are there any institutes that teach gaming?

    ReplyDelete
  2. Games are very complex things to be created. First and foremost there is a front end and back end of the game and they have to be suitably linked together. There are two technologies which are widely used and easy to design games. One is .NET from microsoft and the other game development platform shall be JAVA. This is a bit difficult to code because of the complex features that it supports but is very useful in GAME development.

    ReplyDelete
  3. Yes there are game development institutes which teach game development. It is generally a two to three years course.

    ReplyDelete