AI IN PUBG NEURAL NETWORK

A PLAYER WHO BEATS MORTAL AND ATHENA?

A DEEP LEARNING IN GAMES MODEL WHO LEARNS FROM THE GAME AND THEN BEATS IT PERFECTLY

IMAGINE A MACHINE PLAYING PUBG AND THAT TOO UNBEATABLE.!!SOUNDS AWESOME RIGHT,BUT HOW ?COMPANIES LIKE NVIDIA ARE INVESTING A LOT IN THE ARTIFICIAL INTELLIGENCE INDUSTRY.LEARN HOW NEURAL NETWORKS CAN BE USED TO TRAIN MODELS WHICH SURPASSES A HUMANS ABILITY TO PLAY AND WIN GAMES. YOU MIGHT SAY ” ISN’T AI ALREADY BEING USED IN GAMES LIKE THE VERY RECENT LAST OF US 2 ?” WELL , IT TURNS OUT THE USAGE OF THE TERM ” ARTIFICIAL INTELLIGENCE ” IS RATHER MISLEADING IN THE GAMING COMMUNITY . IT IS A MISNOMER WHICH ACTUALLY REFERS TO THE OPTIMISATION ALGORITHMS USED TO MAKE THE PLAYER THINK THAT THE ENEMIES ARE TAKING LOGICAL DECISIONS . IN REALITY “AI” APPLICATIONS ARE STILL RARE , BUT WE SEE HOW TO MAKE SUCH A MODEL HERE.

WHILE ITS DIFFICULT TO TRAIN MODELS AS THE COMPLEXITY OF GAMES INCREASE BUT EVEN STUDENTS WITH A LITTLE TROUBLE CAN TRAIN SUCH MODELS FOR GAMES LIKE FLAPPY BIRD OR MARIO.

THE CURRENT AI APPLICATIONS ARE MOSTLY LIMITED TO UNDERSTANDING PLAYER BEHAVIOUR, INTRODUCING BOTS , FOR A BETTER UNDERSTANDING AND TESTING OF THE GAME, OR TO PERSONALIZE A GAME ACCORDING TO THE PLAYER . BUT THE IDEA WE DISCUSS HERE IS ABOUT HOW A MACHINE COULD LEARN TO PLAY AS A PLAYER AND EVENTUALLY KEEP PLAYING AND EVOLVING UNLESS IT BEATS IT ALMOST 99.9 PERCENT OF THE TIME.

THE MATH BEHIND THE TRAINING

THERE ARE 2 WAYS WE CAN TRAIN SUCH MODELS

  1. USING A MACHINE LEARNING TECHNIQUE CALLED REINFORCEMENT LEARNING.
  2. USING A DEEP LEARNING NEURAL NETWORK

IN BOTH OF THESE METHODS THE PRINCIPLE METHOD IS TO ALLOW THE MODEL TO PLAY THE GAME AND THEN ON THE BASIS OF WHETHER A DECISION LEADS TO VICTORY OR NOT UPDATE THE PARAMETERS OF THE MODEL. HERE WE DISCUSS THE DEEP LEARNING APPROACH . LETS COMPARE 2 GAMES , LET SAY PUBG AND MARIO ,AND THEN MARIO AND FLAPPY BIRD . HOW WOULD YOU RANK THESE GAMES IN TERMS OF  “COMPLEXITY?”
THE EASIEST AND CORRECT GUESS WOULD BE :

THE CHOICES:

  1. THE NUMBER OF CHOICES YOU CAN MAKE AT ANY POINT IN THE GAME
  2. HOW MANY NEW POSSIBILITIES YOUR DECISION OPENS UP /OR IN SIMPLE WORDS IN HOW MANY WAYS THE GAME CAN GO TOWARDS ITS END, AFTER A PARTICULAR DECISION IS BEING TAKEN.
    NOTICE ON THING, THIS “DECISION MAKING PROCESS IS ACTUALLY A RECURSION RUNNING IN YOUR MIND ,BECAUSE EACH SECOND YOU ARE MAKING A DECISION AND ON BASIS OF THE LAST STEP YOU TRY TO OPTIMIZE YOUR RESULTS FROM THERE.

SO IN FLAPPY BIRD THERE ARE ONLY TWO  CHOICES: YOU TAP OR YOU DONT.AND CONTINUOSLY YOU TAKE THE SAME DECISION. 
IN MARIO ITS EITHER ,STOP ,JUMP ,RUN DOUBLE JUMP.
THINGS GET COMPLEX IN PUBG

  1. 3 DIMENSIONAL MOVEMENT
  2. DECISIONS LIKE CHOICE OF HOUSES ,GUNS ,TO STAND OR TO CRAWL ETC.SO IN SHORT A LOT OF THINKING HAS TO BE DONE .

NOW LETS TRY TO UNDERSTAND THE NEURAL NETWORK THAT CAN BE TRAINED FOR A 2-D GAME , MARIO . CHECKOUT THIS AMAZING VIDEO BY SETH BLING FOR A VISUAL UNDERSTANDING OF WHAT IS HAPPENING AS THE MODEL IS BEING TRAINED

THE GREY SQUARE IS WHAT THE MARIO IS “SEEING” THAT IS WHAT THE PLAYER SEES ,IN OUR CASE WHAT WE SEE ON THE SCREEN WHILE PLAYING ,BUT NOTICE NOT EVERYTHING WE SEE ON THE SCREEN IS NOT RELEVANT ,THE BACKGROUND HILLS ,THE TREES ON THEM ,THE SKY HAS NO EFFECT ON MARIO, THEY ARE JUST FOR MAKING THE INTERFACE LOOK INTERESTING .

SO PRACTICALLY THE IMPORTANT PARTS ARE JUST THE SURFACES, THE REWARDS ,THE TURTLES ,IN SHORT ANY THING THAT CAN EITHER BENEFIT MARIO OR ELSE DO SOME HARM .

TIME IS IMPORTANT

SUPPOSE YOUR MODEL LEARNS HOW TO AVOID DYING PERFECTLY ,BUT IT STAYS AT A PLACE FOR TOO LONG . FOR THAT REASON ,THE MODEL MUST TRY TO FINISH THE GAME AS FAST AS POSSIBLE .

NOW COMING BACK TO THE INPUT , WHICH IS A GREY BOX REPRESENTING THE PRESENCE OF IMPORTANT FEATURES USING PIXELS , NOW AS YOU CAN SEE THE MODEL STARTS OUT TO PLAY KNOWING NOTHING , SLOWLY IT TAKES RANDOM DECISIONS AND TRY TO ASSOCIATE THE OUTCOME TO THE CURRENT IMAGE AS IN THE “INPUT”

#ad

AS A RESULT SLOWLY IT LEARNS WHAT A CERTAIN STEP LEADS TO .AS IN UP ,DOWN , JUMP , REWARDS , COMING IN CONTACT WITH THE TURTLES AND SO. OUR NEURAL NETWORK UPDATES ITSELF OVER TIME . IN ADDITION WE USE A TECHNIQUE CALLED GENETIC PROGRAMMING WHICH SELECTS BEST OF THESE MODELS AND CREATE THE ONE BEST MODEL THAT KNOWS HOW TO PLAY THE GAME EFFICIENTLY . IT IS KNOWN AS EVOLUTION . YOU CAN SEE HOW THIS IS VERY SIMILAR TO DARWIN’S SURVIVAL OF THE “FITTEST”. IN THE END THE FITTEST MARIO SURVIVES .

WHERE CAN YOU TRAIN YOUR OWN MODEL

WITH SOME KNOWLEDGE OF PYTHON AND NEURAL NETWORKS YOU CAN TRAIN YOUR OWN MODEL . ” GYM” IS A PACKAGE USED IN PYTHON THAT ALLOWS YOU TO MAKE SIMULATIONS OF SMALL AND SIMPLE GAMES , MOSTLY 2-D , WHICH YOU CAN TRAIN YOUR NEURAL NETWORK MODEL TO PLAY .

YOU WILL USE GENETIC ALGORITHMS TO TRAIN THE DEEP LEARNING IN GAMES MODEL . FOR A COMPLETELY DETAILED EXPLANATION CLICK HERE .

TRAINING A MODEL FOR A COMPLEX GAME LIKE PUBG

NOW YOU UNDERSTAND HOW A NEURAL NETWORK IS TRAINED TO PLAY MARIO . HOW DO THINGS CHANGE WHEN WE DECIDE TO DO THE SAME FOR PUBG . THE ANSWER LIES IN THE DIMENSIONALITY OF THE PROBLEM . THE PRINCIPLE ,THE MATH MIGHT BE THE SAME ,BUT AT EVERY INSTANT THE AMOUNT OF POSSIBLE DECISIONS THAT COULD BE TAKEN INCREASE MULTIPLE FOLDS. AND WITH SLIGHT KNOWLEDGE OF PERMUTATIONS AND COMBINATIONS YOU CAN VISUALIZE HOW MANY MORE CASES YOU NEED TO CONSIDER IN A 3-D GAME. SPECIALLY WHEN YOU WANT A PLAYER TO LEARN EVERYTHING FROM SCRATCH. THE VERY INPUT COMPLEXITY WILL CHANGE DRASTICALLY . CLICK HERE TO KNOW HOW “AI ” IS INCORPORATED IN THE NEW GAME ” THE LAST OF US 2 “

TECH GIANTS ARE INVESTING HUGE FOR TRAINING SUCH MODELS , A REAL LIFE EXAMPLE IS TESLA AUTOPILOT. AND SOON YOU MIGHT HAVE TO COMPETE WITH OPPONENTS THAT ARE SEEMINGLY UNBEATABLE. THE GAMING INDUSTRY IS GOING TO BE COMPLETELY AI CENTERED BY 2030. STAY AHEAD IN THIS GAME!!! WINNER WINNER ,CHICKEN DINNER!!!

Leave a comment

Your email address will not be published. Required fields are marked *