CS510 AI and Games Final Report on Dec. 09 2008 Juncao Li.

Slides:



Advertisements
Similar presentations
A New World Or People Keep Telling Me This is Ambitious By Jeremiah Lewis.
Advertisements

Spelling Correction for Search Engine Queries Bruno Martins, Mario J. Silva In Proceedings of EsTAL-04, España for Natural Language Processing Presenter:
CSC321: 2011 Introduction to Neural Networks and Machine Learning Lecture 7: Learning in recurrent networks Geoffrey Hinton.
Stopping cheaters since By: Tigran Gasparian.
Randomized Strategies and Temporal Difference Learning in Poker Michael Oder April 4, 2002 Advisor: Dr. David Mutchler.
Intelligent Environments1 Computer Science and Engineering University of Texas at Arlington.
{ Soulcalibur 534 Mike Sandman CS 534 Or: How to Make a Better Training Dummy.
Artificial Intelligence in Game Design Introduction to Learning.
An introduction to: Deep Learning aka or related to Deep Neural Networks Deep Structural Learning Deep Belief Networks etc,
Programming Assignment #3 CS-2301, B-Term Programming Assignment #3 User-defined Functions Due, November 18, 11:59 PM (Assignment adapted from C:
Exceptions in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Speaker Adaptation for Vowel Classification
Neural Networks Marco Loog.
1 Intro to Finite Automata Chapter 2 introduces the concept of a Finite Automata (or FA). An FA has several properties: It is theoretical. It allows computer.
Complexity (Running Time)
UNIVERSITY OF JYVÄSKYLÄ Resource Discovery Using NeuroSearch Presentation for the Agora Center InBCT-seminar Mikko Vapa, researcher InBCT 3.2.
Neural Networks Slides by Megan Vasta. Neural Networks Biological approach to AI Developed in 1943 Comprised of one or more layers of neurons Several.
Introduction to Directed Data Mining: Neural Networks
Face Detection and Neural Networks Todd Wittman Math 8600: Image Analysis Prof. Jackie Shen December 2001.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Introduction to AI Michael J. Watts
Evolving a Sigma-Pi Network as a Network Simulator by Justin Basilico.
Integrating Neural Network and Genetic Algorithm to Solve Function Approximation Combined with Optimization Problem Term presentation for CSC7333 Machine.
Cristian Urs and Ben Riveira. Introduction The article we chose focuses on improving the performance of Genetic Algorithms by: Use of predictive models.
© N. Kasabov Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996 INFO331 Machine learning. Neural networks. Supervised.
An Introduction to Artificial Intelligence and Knowledge Engineering N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering,
Neural Networks AI – Week 23 Sub-symbolic AI Multi-Layer Neural Networks Lee McCluskey, room 3/10
Learning BlackJack with ANN (Aritificial Neural Network) Ip Kei Sam ID:
For games. 1. Control  Controllers for robotic applications.  Robot’s sensory system provides inputs and output sends the responses to the robot’s motor.
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Created By: Kevin Jiang, Cullen Wong, Stephen Halter.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
1 Phase II - Checkers Operator: Eric Bengfort Temporal Status: End of Week Five Location: Phase Two Presentation Systems Check: Checkers Checksum Passed.
AI in Computer Gaming: The first person shooter Tyler Hulburd.
Problem of the Day  Why are manhole covers round?
Testing and Debugging Session 9 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Machine Learning for an Artificial Intelligence Playing Tic-Tac-Toe Computer Systems Lab 2005 By Rachel Miller.
Computer Systems Lab TJHSST Current Projects In-House, pt 5.
Neural Network Implementation of Poker AI
 Based on observed functioning of human brain.  (Artificial Neural Networks (ANN)  Our view of neural networks is very simplistic.  We view a neural.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Evolving Reactive NPCs for the Real-Time Simulation Game.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
CS 478 – Tools for Machine Learning and Data Mining Perceptron.
Pac-Man AI using GA. Why Machine Learning in Video Games? Better player experience Agents can adapt to player Increased variety of agent behaviors Ever-changing.
Artificial Intelligence, Expert Systems, and Neural Networks Group 10 Cameron Kinard Leaundre Zeno Heath Carley Megan Wiedmaier.
Reactive and Output-Only HKOI Training Team 2006 Liu Chi Man (cx) 11 Feb 2006.
CS 1120: Computer Science II Software Life Cycle Slides courtesy of: Prof. Ajay Gupta and Prof. James Yang (format and other minor modifications by by.
AI & Machine Learning Libraries By Logan Kearsley.
CS 351/ IT 351 Modeling and Simulation Technologies Review ( ) Dr. Jim Holten.
Dynamic Task Allocation in a turn based strategy game Gilles Schtickzelle September 2012 ULB.
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 3 Friday 03 Oct 2014 EGR 115 Introduction to Computing for Engineers.
Backgammon Group 1: - Remco Bras - Tim Beyer - Maurice Hermans - Esther Verhoef - Thomas Acker.
The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.
The Pentium Goes to Vegas Training a Neural Network to Play BlackJack Paul Ruvolo and Christine Spritke.
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Examining the Mechanisms of the Human Brain with Computer Science Arvind Ravichandran.
Neural Networks Lecture 11: Learning in recurrent networks Geoffrey Hinton.
語音訊號處理之初步實驗 NTU Speech Lab 指導教授: 李琳山 助教: 熊信寬
CAP6938 Neuroevolution and Artificial Embryogeny Real-time NEAT Dr. Kenneth Stanley February 22, 2006.
Today’s Topics 11/10/15CS Fall 2015 (Shavlik©), Lecture 21, Week 101 More on DEEP ANNs –Convolution –Max Pooling –Drop Out Final ANN Wrapup FYI:
Math Expression Evaluation With RegEx and Finite State Machines.
OPTIMIZATION OF MODELS: LOOKING FOR THE BEST STRATEGY
Fall 2004 Perceptron CS478 - Machine Learning.
Recitation #3 Tel Aviv University 2016/2017 Slava Novgorodov
Unsupervised Learning and Neural Networks
Interaction with artificial intelligence in games
C. M. Overstreet Old Dominion University Spring 2006
David Kauchak CS158 – Spring 2019
C. M. Overstreet Old Dominion University Fall 2007
Outline Announcement Neural networks Perceptrons - continued
Presentation transcript:

CS510 AI and Games Final Report on Dec Juncao Li

Science, Portland State University2 Agenda About Advanced Protection My Design and Work Results and Evaluations Conclusion and Discussion

Science, Portland State University3 Advanced Protection (AP) Author: Soren Johnson Turn-based strategy game –Player makes strategy each turn –AI plays against player’s strategy Static AI V.S. adaptive AI –Player learns the strategy of static AIs –Adaptive AI adapts based on users performance

Science, Portland State University4 AP (Cont.)

Science, Portland State University5 AP (Cont.)

Science, Portland State University6 AP (Cont.)

Science, Portland State University7 AP (Cont.) Features –Each minion has a brain (automaton) encoded by a 128-bit string –Four behaviors depending on the input: Move forward, turn right, turn left and do actions –250 brains for a minion to choose 20 hardcoded, 230 from genetic algorithm During the play, brains are rated based on their performance against the player –Dynamically choose best-fit brains Each player has their own easy and hard minion brains Players does not loose or win too much

Science, Portland State University8 Minion Inputs

Science, Portland State University9 Why Brain Matters

Science, Portland State University10 Why Brain Matters (Cont.)

Science, Portland State University11 Why Brain Matters (Cont.)

Science, Portland State University12 Agenda About Advanced Protection My Design and Work Results and Evaluations Conclusion and Discussion

Science, Portland State University13 My Goal & Why Design AIs that play as players –Try to learn the player’s strategy –Try to perform best on all 250 brains Because Chaos selects brains based on player’s strategy Win (defined later) brains as much as it could Design benchmark for the AIs on each side –How well each AI performs Learning about players helps game designs –Player will not like a game that they can never win! –Player will not like a game that they can easily win!

Science, Portland State University14 Finite State Machine (FSM) Code the game strategy in a FSM Inputs or what matters –Treasury: Human and Chaos –Terrain and current human nodes on the map Output –Where to place the units –What units to place –Based on current state Allocate more farmers for earning money Allocate more infantry for attacking Chaos

Science, Portland State University15 FSM (Cont.)

Science, Portland State University16 FSM (Cont.)

Science, Portland State University17 FSM (Cont.)

Science, Portland State University18 FSM (Cont.) My FSM is static Hard to make it dynamic and adaptive –Too many possibilities (24*24 size map plus human ……) Works well as a benchmark –How well the Chaos AI performs Train Neural Network (NN) –Hopefully, teach the NN to recognize the map

Science, Portland State University19 Use Neural Network (NN) Input nodes: MAP_SIZE+2 –Map size: 24*24 = 576 –Human+Chaos treasury: 1+1 Output nodes: MAP_SIZE –Human units placement One hidden layer: MAP_SIZE+2 Normalize the inputs/outputs range: [0.0, 1.0] Use other’s NN code: –AI Game Engine: well developed, but not efficient –Tim Jones book: simple and efficient NN

Science, Portland State University20 Train the NN Firstly, use the static FSM to train the NN –Random generated maps –Random initial Human/Chaos treasury –FSM generates outputs as the training case Secondly, improve the NN –Randomly generate strategy –If it performs better than current NN –Train NN with the strategy

Science, Portland State University21 Understand the NN Outputs NN doesn’t always tell the exact answer So we have to “guess” Human_T MatchHuman(float type){ float threashold = 0.2; type = type*HUMAN_TYPES; if(type HUMAN_TYPES+threashold) return NO_HUMAN; if(fabs(type-float(DRONE))<threashold) return DRONE; else if(fabs(type-float(MINE))<threashold) return MINE; else if(fabs(type-float(FARMER))<threashold) return FARMER; else if(fabs(type-float(INFANTRY))<threashold) return INFANTRY; else if(fabs(type-float(SETTLER))<threashold) return SETTLER; else if(fabs(type-float(ARMOR))<threashold) return ARMOR; else if(fabs(type-float(JAMMER))<threashold) return JAMMER; else if(fabs(type-float(ARTILLERY))<threashold) return ARTILLERY; return NO_HUMAN; } CNNPlayer::DoTurns(){ …… //normalize the output float low = actual[0]; float high = actual[0]; float avg = 0; for(i=0; i<OUTPUT_NEURONS; i++){ if(low>actual[i]) low=actual[i]; if(high<actual[i]) high=actual[i]; avg+=actual[i]/OUTPUT_NEURONS; } for(i=0; i<OUTPUT_NEURONS; i++){ if(actual[i]<=0) actual[i] = 0; else{ actual[i] = (actual[i]-low)/(high-low); //actual[i] = actual[i]/avg; } …… }

Science, Portland State University22 NN Outputs (4 hour & 1M inter.)

Science, Portland State University23 Recall the FSM

Science, Portland State University24 A Random NN Give You This!

Science, Portland State University25 Agenda About Advanced Protection My Design and Work Results and Evaluations Conclusion and Discussion

Science, Portland State University26 Evaluations Test based on each turn –Only for each turn, the Chaos’ brain is certain –My AI performs well (win) if and only if: Given random initial treasury and map It has advantage against most Chaos’ brains (money earned) Good performance on each turn leads to final win

Science, Portland State University 27 Statistics of My FSM Initial Treasury We want this! Not well dealing with money between this range

Science, Portland State University 28 Statistics of My NN AI Initial Treasury We want this!

Science, Portland State University29 Agenda About Advanced Protection My Design and Work Results and Evaluations Conclusion and Discussion

Science, Portland State University30 Conclusion Studied AP –Adaptive turn-based strategy game Static FSM –Benchmark –Train NN NN –Developed a demo –Trained by FSM –Need more time to train it

Science, Portland State University31 Discussion Static FSM –Efficient to code –Pros: do exactly what you want –Cons: do exactly what you want NN –Like dealing with a child Patient Be careful what you feed to it Try to understand a child’s language More trained, usually better performance

Science, Portland State University32 Discussion (Cont.) Coding & debugging issues –Error in coding NN is not easy to be detected Wrong training data Inconsistent between training inputs and using inputs –Be careful about important parts Training data Training process –Set breakpoint to check –Code review –Train it by the same example, see if it adapts as expected

Science, Portland State University33 Questions ?