Games Programming with Java

Slides:



Advertisements
Similar presentations
Chapter 09 AI techniques in different game genres (Puzzle/Card/Shooting)
Advertisements

Artificial Intelligence
Becerra-Fernandez, et al. -- Knowledge Management 1/e -- © 2004 Prentice Hall Chapter 7 Technologies to Manage Knowledge: Artificial Intelligence.
Application of Artificial intelligence to Chess Playing Capstone Design Project 2004 Jason Cook Bitboards  Bitboards are 64 bit unsigned integers, with.
WHAT IS ARTIFICIAL INTELLIGENCE?
CPSC 322 Introduction to Artificial Intelligence October 6, 2004.
ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
Introduction to Artificial Intelligence Ruth Bergman Fall 2004.
Introduction to Artificial Intelligence CSE 473 Winter 1999.
PSU CS 370 – Artificial Intelligence Dr. Mohamed Tounsi Artificial Intelligence 1. Introduction Dr. M. Tounsi.
COMP 4640 Intelligent & Interactive Systems Cheryl Seals, Ph.D. Computer Science & Software Engineering Auburn University.
Introduction to Artificial Intelligence Prof. Kathleen McKeown 722 CEPSR, TAs: Kapil Thadani 724 CEPSR, Phong Pham TA Room.
Random Administrivia In CMC 306 on Monday for LISP lab.
PSYCHOLOGY Introduction to Psychology By Dr. Abdullah AL-ZAhrani.
Introduction to Artificial Intelligence ITK 340, Spring 2010.
1 Artificial Intelligence An Introductory Course.
Computer Science 1000 AI – A Brief Overview. Artificial Intelligence definition: many! `` ``The exciting new effort to make computers think... machines.
Artificial Intelligence Dr. Paul Wagner Department of Computer Science University of Wisconsin – Eau Claire.
CSCI 4410 Introduction to Artificial Intelligence.
Introduction (Chapter 1) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Artificial Intelligence Lecture No. 3
Introduction to Artificial Intelligence. Content Definition of AI Typical AI problems Practical impact of AI Approaches of AI Limits of AI Brief history.
Lecture 1 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
Chapter 4 by Kathleen Mastrian and Dee McGonigle
A RTIFICIAL I NTELLIGENCE Introduction 3 October
CSE4/563: Knowledge Representation Recitation September 13, 2010 “Intelligence is the art of good guesswork.” –H.B. Barlow.
If the human brain were so simple that we could understand it, we would be so simple that we couldn't. —Emerson M. Pugh.
Graph Coloring with Ants
Application of Artificial Intelligence to Chess Playing Jason Cook Capstone Project.
Artificial Intelligence in Game Design Dynamic Path Planning Algorithms.
1 CS 2710, ISSP 2610 Foundations of Artificial Intelligence introduction.
1 Introduction to Artificial Intelligence (Lecture 1)
Artificial Intelligence: Introduction Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
AI and Games by Lauren Argenio Russell Braun. Project Goals What AI is The basics of how it works How it is applied to games –In the past –Present –Future.
Artificial Intelligence
Computational theory techniques in interactive video games.
Artificial Intelligence IES 503 Asst. Prof. Dr. Senem Kumova Metin.
Definitions of AI There are as many definitions as there are practitioners. How would you define it? What is important for a system to be intelligent?
University of Kurdistan Artificial Intelligence Methods (AIM) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
Introduction to Artificial Intelligence CS 438 Spring 2008.
Games Programming with Java ::: AI ::: Games Programming with Java Montri Karnjanadecha Andrew Davison.
Chapter 1 Artificial Intelligence Overview Instructor: Haris Shahzad Artificial Intelligence CS-402.
A Brief History of AI Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
CompSci Problem Solving: Sudoku  Rules of the Game Sudoku is played with a 9 by 9 "board" consisting of nine 3 by 3 sub-boards. The symbols 1 -
CS382 Introduction to Artificial Intelligence Lecture 1: The Foundations of AI and Intelligent Agents 24 January 2012 Instructor: Kostas Bekris Computer.
INTRODUCTION TO COGNITIVE SCIENCE NURSING INFORMATICS CHAPTER 3 1.
COMP 4640 Intelligent & Interactive Systems Cheryl Seals, Ph.D. Computer Science & Software Engineering Auburn University.
1 Artificial Intelligence & Prolog Programming CSL 302.
The Game Development Process: Artificial Intelligence.
Artificial Intelligence
Overview of Artificial Intelligence (1) Artificial intelligence (AI) Computers with the ability to mimic or duplicate the functions of the human brain.
Introduction to Artificial Intelligence Prof. Kathleen McKeown 722 CEPSR Tas: Andrew Rosenberg Speech Lab, 7 th Floor CEPSR Sowmya Vishwanath TA Room.
Artificial Intelligence and its Portrayal in Electronic Media
Artificial Intelligence
Introduction to Artificial Intelligence
TK3043 Analysis and Design of Algorithms
Lecture #1 Introduction
Introduction to Artificial Intelligence
COMP 4640 Intelligent & Interactive Systems
CSCI 5582 Artificial Intelligence
Course Instructor: knza ch
Intelligence Are the things shown below, Intelligent?
Systems that THINK Like Humans
Course Outline Advanced Introduction Expert Systems Topics Problem
EA C461 – Artificial Intelligence Introduction
COMP3710 Artificial Intelligence Thompson Rivers University
Introduction to Artificial Intelligence Instructor: Dr. Eduardo Urbina
Artificial Intelligence
Othello Artificial Intelligence With Machine Learning
Presentation transcript:

240-492 Games Programming with Java Montri Karnjanadecha Andrew Davison 240-492 Games Programming with Java ::: AI :::

Chapter 2 Introduction to Artificial Intelligence 25/04/62 Chapter 2 Introduction to Artificial Intelligence 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Outline Definition of Artificial Intelligence Uninformed Search Methods Informed Search Methods Game AI 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java What is AI? Systems that think like humans “The exciting new effort to make computer think ….. machine with minds, in the full an literal sense” “Activities that we associate with human thinking, activities such as decision-making, problem-solving, learning…” Systems that think rationally “The study of mental faculties through the use of computational models” “The study of the computations that make it possible to perceive, reason, and act” 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java That is AI? (cont’d) Systems that act like humans “The art of creating machines that perform functions that require intelligence when performed by people” “The study of how to make computers do things at which, at the moment, people are better” Systems that act rationally “A field of study that seeks to explain and emulate intelligent behavior in terms of computational processes” “The branch of computer science that is concerned with the automation of intelligent behavior” 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java What is AI? (cont’d) To make the computer think 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Simple AI Stuff A board with tokens 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Closing the gap A board with tokens 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Chase Algorithm if (lx!=dx) // check for non-matching x { if (lx>dx) lx--; // higher x, so decrease it } else lx++; // lower x, so increase it if (ly!=dy) // check for non-matching y if (ly>dy) ly--; // higher y, so decrease it ly++; // lower y, so increase it 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Evade Algorithm if (lx!=dx) // check for non-matching x { if (lx>dx) lx++; // higher x, so increase it } else lx--; // lower x, so decrease it if (ly!=dy) // check for non-matching y if (ly>dy) ly++; // higher y, so increase it ly--; // lower y, so decrease it 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Chasing Struck The simple chase algorithm fails when unmovable blocks are presented 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Evading the Obstacle 240-492 Games Programming with Java ::: AI :::

More Advanced Pathfinding A* pathfinding algorithm 1. Create a 2-D integer array as large as the map size 2. Fill all cells with -1 (-1 means not tested yet) 3. For any “blocked” cell, put a large number (e.g. 255) 4. Place a 0 in the target cell 240-492 Games Programming with Java ::: AI :::

A* pathfinding algorithm 5. Start at the target cell (the known distance cell) 6. Determine valid adjacent cells 7. Give the adjacent cells a known distance value 8. Repeat step 5 Stop Citeria 1. No adjacent cells 2. The cell of origin gets filled in 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java When It’s All Done Path finding 5. Start at the target cell (the known distance cell) 6. Determine valid adjacent cells 7. Give the adjacent cells a known distance value 8. Repeat step 5 Stop Criteria 1. No adjacent cells 2. The cell of origin gets filled in 240-492 Games Programming with Java ::: AI :::

240-492 Games Programming with Java Backtracking In order for the red piece to capture the green piece, the red piece must move to lower-values cells-- from 7->6, 6-> 5, 5->4, 4->3, 3->2, 2->1 and 1->0 240-492 Games Programming with Java ::: AI :::