SlideShare a Scribd company logo
INTRO TO INTELLIGENT AND
AUTONOMOUS AGENTS



Steering behaviors and pathfinding
Game AI

 What we’re covering today
   And what we’re not
 How AI can improve your games
 Autonomous agents
Steering Behaviors

 What they are
 When they’re used
   Quite often
   http://www.youtube.com/watch?v=e2YYtSJhmJg
   Movies
 Let’s try some out!
Seek

 Move entity from current position to target
  position as quickly as possible
Our entity is the triangle. How do we get to the
target?
Desired velocity = target.position - myPosition
You can get a vector pointing from A to B by B - A
Don’t worry about
overshooting, it’ll be
corrected
Other steering behaviors

 Arrive
 Obstacle Avoidance


 Make sure we don’t have a force that’s too
  big!
Using SBs in your Entities

 ChasePlayer State
   Obstacle avoidance, Pursue or Seek
 Idle State
   Wander, maybe flocking?


 Sheep
   Flocking, Wander, Obstacle Avoidance, Evade
Steering behaviors ftw :?
Wouldn’t this be lovely? Well then, let’s find a path
A graph of points! (navigation graph)
Building a Nav Graph

 Goal: A list of nodes and edges
 What is needed:
   Start point, cast distance, interval
   (optional)Max number of nodes
Data Structures

GraphNode                              GraphEdge

Vector3 position                       GraphNode fromNode
GraphEdge[4] edges                     GraphFrom toNode
                                       (Float weight)
List<GraphNodes> Nodes

For ( i = 1; i <= xCastDistance; ++i)
      For (j = 1; j <= zCastDistance; ++j)
      {
            cast a ray downward from above for each potential neighbor node
            (i.e. (curX + invertal, curZ), (curX, curZ + interval), etc.)
            if raycast hit the ground
            {
                  new GraphNode(GraphNode(Raycast hit point))
                 if we haven’t already found this node
                 {
                        Add new graph node to Nodes
                 }

             (calculate edge cost)
             new GraphEdge(current node, new graph node, cost))
             Add new graph edge to the current node’s Edge list
         }
Start from initial position, start casting out!
What happens when node cast hits out of bounds?
New position
Nothing new, just adding another node/edge
:o A box!
Hit an object not tagged ground, skip it, keep moving
:OOOOO But we already processed that node!
Result depends on algorithm implementation. Easy route (the way the pseudo code was
setup) is to have each node responsible for itself. So in our case add the edge and ignore
the node.
Improvements Worth Mentioning

 Reducing node density
 Indexing GraphNodes and GraphEdges
Data Structures for Indexing

GraphNode                                         GraphEdge

int index                                         int fromNodeIndex
Vector3 position                                  int toNodeIndex
GraphEdge[4] mEdges                               float weight




  Instead of storing the GraphNodes that a GraphEdge is connected to, we
  store the index of each GraphNode, so we’re not storing a GraphNode twice
Take a look at that graph
Search Algorithms

 Depth-first search
 Breadth-first search
 Dijkstra’s algorithm
 A* (aka Dijkstra++)
   ^ yahtzee
Dijkstra’s Algorithm

 Usable with weighted graphs. Graphs without
  weight can be processed by assuming edges
  of equal weight
 Guaranteed to find shortest path, if it exists.
 Implementation
   Examine nodes on our search frontier, find the
    one with the smallest total weight, and add it to
    our path and keep going
Picture from “Programming Game AI by Example” by Mat Buckland
Picture from “Programming Game AI by Example” by Mat Buckland
A*

 Dijkstra with an additional weight factor
  (heuristic)
   Heuristic: Making a decision based on some knowledge

 There’s something troublesome in the Dijsktra
  implementation that seems like it would be an
  easy fix
We know where our target is, so let’s
 approximate the cost from the nodes we are
 looking at to the target and factor that
 into what we choose
In this case, Euclidean distance
Manhattan Distance
Results
Picture from “Programming Game AI by Example” by Mat Buckland
Picture from “Programming Game AI by Example” by Mat Buckland
Review

 Steering behaviors
 Navigation graphs
 Search algorithms


 So how do they work together?
   You have a point on the graph you want to reach.
   You find a sequence of nodes to follow.
   Use steering behaviors to get from point to
    point, and create interesting behavior on the way
Next time…

 Organizing these lower level decisions into
  functional, autonomous agents (in a
  smart, extendable, debug-friendly way )

 Questions?

(can someone let Jordan know he can wake up now? kthx)

More Related Content

What's hot

Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
stefan_b
 
The Speed of Two Objects
The Speed of Two ObjectsThe Speed of Two Objects
The Speed of Two Objects
Alex Lee
 
02 Geographic scripting in uDig - halfway between user and developer
02 Geographic scripting in uDig - halfway between user and developer02 Geographic scripting in uDig - halfway between user and developer
02 Geographic scripting in uDig - halfway between user and developer
Andrea Antonello
 
Machine Learning lecture2(linear regression)
Machine Learning lecture2(linear regression)Machine Learning lecture2(linear regression)
Machine Learning lecture2(linear regression)
cairo university
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_opengl
Manas Nayak
 
Machine Learning lecture3(linear regression)
Machine Learning lecture3(linear regression)Machine Learning lecture3(linear regression)
Machine Learning lecture3(linear regression)
cairo university
 
Data structure
Data structureData structure
Data structure
kavitha muneeshwaran
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
Mark Kilgard
 
Opensource gis development - part 4
Opensource gis development - part 4Opensource gis development - part 4
Opensource gis development - part 4
Andrea Antonello
 
Artdm170 week12 user_interaction
Artdm170 week12 user_interactionArtdm170 week12 user_interaction
Artdm170 week12 user_interaction
Gilbert Guerrero
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
Mark Kilgard
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for robotics
SALAAMCHAUS
 
Spectral graph theory
Spectral graph theorySpectral graph theory
Spectral graph theory
Danushka Bollegala
 
Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]
Saajid Akram
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial Networks
Mark Chang
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
Mark Kilgard
 
Unsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANUnsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGAN
Shyam Krishna Khadka
 
Transfer learningforclp
Transfer learningforclpTransfer learningforclp
Transfer learningforclp
Danushka Bollegala
 
CSS3: Border And Colors
CSS3: Border And ColorsCSS3: Border And Colors
CSS3: Border And Colors
Reema
 
Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...
Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...
Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...
Computer Science Club
 

What's hot (20)

Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
 
The Speed of Two Objects
The Speed of Two ObjectsThe Speed of Two Objects
The Speed of Two Objects
 
02 Geographic scripting in uDig - halfway between user and developer
02 Geographic scripting in uDig - halfway between user and developer02 Geographic scripting in uDig - halfway between user and developer
02 Geographic scripting in uDig - halfway between user and developer
 
Machine Learning lecture2(linear regression)
Machine Learning lecture2(linear regression)Machine Learning lecture2(linear regression)
Machine Learning lecture2(linear regression)
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_opengl
 
Machine Learning lecture3(linear regression)
Machine Learning lecture3(linear regression)Machine Learning lecture3(linear regression)
Machine Learning lecture3(linear regression)
 
Data structure
Data structureData structure
Data structure
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
 
Opensource gis development - part 4
Opensource gis development - part 4Opensource gis development - part 4
Opensource gis development - part 4
 
Artdm170 week12 user_interaction
Artdm170 week12 user_interactionArtdm170 week12 user_interaction
Artdm170 week12 user_interaction
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for robotics
 
Spectral graph theory
Spectral graph theorySpectral graph theory
Spectral graph theory
 
Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial Networks
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
Unsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANUnsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGAN
 
Transfer learningforclp
Transfer learningforclpTransfer learningforclp
Transfer learningforclp
 
CSS3: Border And Colors
CSS3: Border And ColorsCSS3: Border And Colors
CSS3: Border And Colors
 
Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...
Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...
Andrew Goldberg. Highway Dimension and Provably Efficient Shortest Path Algor...
 

Viewers also liked

Presentation5
Presentation5Presentation5
Presentation5
Akshay Anand
 
Steering Behaviours: Wander
Steering Behaviours: WanderSteering Behaviours: Wander
Steering Behaviours: Wander
Sam Cartwright
 
Driving simulators to support the design of autonomous vehicles
Driving simulators to support the design of autonomous vehiclesDriving simulators to support the design of autonomous vehicles
Driving simulators to support the design of autonomous vehicles
Institute for Transport Studies (ITS)
 
Massive Battle: Coordinated Movement of Autonomous Agents
Massive Battle: Coordinated Movement of Autonomous AgentsMassive Battle: Coordinated Movement of Autonomous Agents
Massive Battle: Coordinated Movement of Autonomous Agents
Wolfgang Hürst
 
AI in Games- Steering, Wander and Flocking behavior
AI in Games- Steering, Wander and Flocking behaviorAI in Games- Steering, Wander and Flocking behavior
AI in Games- Steering, Wander and Flocking behavior
ナム-Nam Nguyễn
 
Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...
Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...
Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...
CA API Management
 
Mobile platform
Mobile platformMobile platform
Mobile platform
pratishyadav
 
Software engineering-quiz
Software engineering-quizSoftware engineering-quiz
Software engineering-quiz
Dr. C.V. Suresh Babu
 

Viewers also liked (8)

Presentation5
Presentation5Presentation5
Presentation5
 
Steering Behaviours: Wander
Steering Behaviours: WanderSteering Behaviours: Wander
Steering Behaviours: Wander
 
Driving simulators to support the design of autonomous vehicles
Driving simulators to support the design of autonomous vehiclesDriving simulators to support the design of autonomous vehicles
Driving simulators to support the design of autonomous vehicles
 
Massive Battle: Coordinated Movement of Autonomous Agents
Massive Battle: Coordinated Movement of Autonomous AgentsMassive Battle: Coordinated Movement of Autonomous Agents
Massive Battle: Coordinated Movement of Autonomous Agents
 
AI in Games- Steering, Wander and Flocking behavior
AI in Games- Steering, Wander and Flocking behaviorAI in Games- Steering, Wander and Flocking behavior
AI in Games- Steering, Wander and Flocking behavior
 
Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...
Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...
Autonomous Agents on the Web: Beyond Linking and Meaning Mike Amundsen Keynot...
 
Mobile platform
Mobile platformMobile platform
Mobile platform
 
Software engineering-quiz
Software engineering-quizSoftware engineering-quiz
Software engineering-quiz
 

Similar to Ai part 1

Difference between logistic regression shallow neural network and deep neura...
Difference between logistic regression  shallow neural network and deep neura...Difference between logistic regression  shallow neural network and deep neura...
Difference between logistic regression shallow neural network and deep neura...
Chode Amarnath
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep Learning
Shajun Nisha
 
Pathfinding in games
Pathfinding in gamesPathfinding in games
Pathfinding in games
Adrian Popovici
 
dijkstra algo.ppt
dijkstra algo.pptdijkstra algo.ppt
dijkstra algo.ppt
Santhosh Krishna
 
Practical Digital Image Processing 3
 Practical Digital Image Processing 3 Practical Digital Image Processing 3
Practical Digital Image Processing 3
Aly Abdelkareem
 
The Day You Finally Use Algebra: A 3D Math Primer
The Day You Finally Use Algebra: A 3D Math PrimerThe Day You Finally Use Algebra: A 3D Math Primer
The Day You Finally Use Algebra: A 3D Math Primer
Janie Clayton
 
SIFT
SIFTSIFT
3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago
Janie Clayton
 
ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...
ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...
ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...
Thejaka Amila Kanewala, Ph.D.
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
GIS in the Rockies
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
oneous
 
Distributed computing with spark
Distributed computing with sparkDistributed computing with spark
Distributed computing with spark
Javier Santos Paniego
 
Primitives
PrimitivesPrimitives
2-Heuristic Search.ppt
2-Heuristic Search.ppt2-Heuristic Search.ppt
2-Heuristic Search.ppt
MIT,Imphal
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
Diksha Trivedi
 
Monads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy DyagilevMonads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy Dyagilev
JavaDayUA
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
PyData
 
artifical intelligence final paper
artifical intelligence final paperartifical intelligence final paper
artifical intelligence final paper
shiva karthik reddy koyya
 
Lec5 Pagerank
Lec5 PagerankLec5 Pagerank
Lec5 Pagerank
Jeff Hammerbacher
 
Lec5 Pagerank
Lec5 PagerankLec5 Pagerank
Lec5 Pagerank
mobius.cn
 

Similar to Ai part 1 (20)

Difference between logistic regression shallow neural network and deep neura...
Difference between logistic regression  shallow neural network and deep neura...Difference between logistic regression  shallow neural network and deep neura...
Difference between logistic regression shallow neural network and deep neura...
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep Learning
 
Pathfinding in games
Pathfinding in gamesPathfinding in games
Pathfinding in games
 
dijkstra algo.ppt
dijkstra algo.pptdijkstra algo.ppt
dijkstra algo.ppt
 
Practical Digital Image Processing 3
 Practical Digital Image Processing 3 Practical Digital Image Processing 3
Practical Digital Image Processing 3
 
The Day You Finally Use Algebra: A 3D Math Primer
The Day You Finally Use Algebra: A 3D Math PrimerThe Day You Finally Use Algebra: A 3D Math Primer
The Day You Finally Use Algebra: A 3D Math Primer
 
SIFT
SIFTSIFT
SIFT
 
3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago
 
ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...
ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...
ABSTRACT GRAPH MACHINE: MODELING ORDERINGS IN ASYNCHRONOUS DISTRIBUTED-MEMORY...
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
 
Distributed computing with spark
Distributed computing with sparkDistributed computing with spark
Distributed computing with spark
 
Primitives
PrimitivesPrimitives
Primitives
 
2-Heuristic Search.ppt
2-Heuristic Search.ppt2-Heuristic Search.ppt
2-Heuristic Search.ppt
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Monads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy DyagilevMonads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy Dyagilev
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
 
artifical intelligence final paper
artifical intelligence final paperartifical intelligence final paper
artifical intelligence final paper
 
Lec5 Pagerank
Lec5 PagerankLec5 Pagerank
Lec5 Pagerank
 
Lec5 Pagerank
Lec5 PagerankLec5 Pagerank
Lec5 Pagerank
 

More from spartasoft

Interviewing and Getting a Job 101
Interviewing and Getting a Job 101Interviewing and Getting a Job 101
Interviewing and Getting a Job 101
spartasoft
 
Spartasoft Month Long Game Roundtable
Spartasoft Month Long Game RoundtableSpartasoft Month Long Game Roundtable
Spartasoft Month Long Game Roundtable
spartasoft
 
Gpu presentation
Gpu presentationGpu presentation
Gpu presentation
spartasoft
 
GDC 2011 recap
GDC 2011 recapGDC 2011 recap
GDC 2011 recap
spartasoft
 
Console development
Console developmentConsole development
Console development
spartasoft
 
Build some PR!
Build some PR!Build some PR!
Build some PR!
spartasoft
 
Unite 2010
Unite 2010Unite 2010
Unite 2010
spartasoft
 

More from spartasoft (7)

Interviewing and Getting a Job 101
Interviewing and Getting a Job 101Interviewing and Getting a Job 101
Interviewing and Getting a Job 101
 
Spartasoft Month Long Game Roundtable
Spartasoft Month Long Game RoundtableSpartasoft Month Long Game Roundtable
Spartasoft Month Long Game Roundtable
 
Gpu presentation
Gpu presentationGpu presentation
Gpu presentation
 
GDC 2011 recap
GDC 2011 recapGDC 2011 recap
GDC 2011 recap
 
Console development
Console developmentConsole development
Console development
 
Build some PR!
Build some PR!Build some PR!
Build some PR!
 
Unite 2010
Unite 2010Unite 2010
Unite 2010
 

Recently uploaded

DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 

Recently uploaded (20)

DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 

Ai part 1

  • 1. INTRO TO INTELLIGENT AND AUTONOMOUS AGENTS Steering behaviors and pathfinding
  • 2. Game AI  What we’re covering today  And what we’re not  How AI can improve your games  Autonomous agents
  • 3. Steering Behaviors  What they are  When they’re used  Quite often  http://www.youtube.com/watch?v=e2YYtSJhmJg  Movies  Let’s try some out!
  • 4. Seek  Move entity from current position to target position as quickly as possible
  • 5. Our entity is the triangle. How do we get to the target?
  • 6. Desired velocity = target.position - myPosition
  • 7. You can get a vector pointing from A to B by B - A
  • 8.
  • 9.
  • 10. Don’t worry about overshooting, it’ll be corrected
  • 11. Other steering behaviors  Arrive  Obstacle Avoidance  Make sure we don’t have a force that’s too big!
  • 12. Using SBs in your Entities  ChasePlayer State  Obstacle avoidance, Pursue or Seek  Idle State  Wander, maybe flocking?  Sheep  Flocking, Wander, Obstacle Avoidance, Evade
  • 14. Wouldn’t this be lovely? Well then, let’s find a path
  • 15. A graph of points! (navigation graph)
  • 16. Building a Nav Graph  Goal: A list of nodes and edges  What is needed:  Start point, cast distance, interval  (optional)Max number of nodes
  • 17. Data Structures GraphNode GraphEdge Vector3 position GraphNode fromNode GraphEdge[4] edges GraphFrom toNode (Float weight)
  • 18. List<GraphNodes> Nodes For ( i = 1; i <= xCastDistance; ++i) For (j = 1; j <= zCastDistance; ++j) { cast a ray downward from above for each potential neighbor node (i.e. (curX + invertal, curZ), (curX, curZ + interval), etc.) if raycast hit the ground { new GraphNode(GraphNode(Raycast hit point)) if we haven’t already found this node { Add new graph node to Nodes } (calculate edge cost) new GraphEdge(current node, new graph node, cost)) Add new graph edge to the current node’s Edge list }
  • 19. Start from initial position, start casting out!
  • 20.
  • 21. What happens when node cast hits out of bounds?
  • 22.
  • 24. Nothing new, just adding another node/edge
  • 25. :o A box! Hit an object not tagged ground, skip it, keep moving
  • 26. :OOOOO But we already processed that node! Result depends on algorithm implementation. Easy route (the way the pseudo code was setup) is to have each node responsible for itself. So in our case add the edge and ignore the node.
  • 27. Improvements Worth Mentioning  Reducing node density  Indexing GraphNodes and GraphEdges
  • 28. Data Structures for Indexing GraphNode GraphEdge int index int fromNodeIndex Vector3 position int toNodeIndex GraphEdge[4] mEdges float weight Instead of storing the GraphNodes that a GraphEdge is connected to, we store the index of each GraphNode, so we’re not storing a GraphNode twice
  • 29. Take a look at that graph
  • 30. Search Algorithms  Depth-first search  Breadth-first search  Dijkstra’s algorithm  A* (aka Dijkstra++)  ^ yahtzee
  • 31. Dijkstra’s Algorithm  Usable with weighted graphs. Graphs without weight can be processed by assuming edges of equal weight  Guaranteed to find shortest path, if it exists.  Implementation  Examine nodes on our search frontier, find the one with the smallest total weight, and add it to our path and keep going
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. Picture from “Programming Game AI by Example” by Mat Buckland
  • 40. Picture from “Programming Game AI by Example” by Mat Buckland
  • 41. A*  Dijkstra with an additional weight factor (heuristic)  Heuristic: Making a decision based on some knowledge  There’s something troublesome in the Dijsktra implementation that seems like it would be an easy fix
  • 42. We know where our target is, so let’s approximate the cost from the nodes we are looking at to the target and factor that into what we choose In this case, Euclidean distance
  • 44. Results Picture from “Programming Game AI by Example” by Mat Buckland
  • 45. Picture from “Programming Game AI by Example” by Mat Buckland
  • 46. Review  Steering behaviors  Navigation graphs  Search algorithms  So how do they work together?  You have a point on the graph you want to reach.  You find a sequence of nodes to follow.  Use steering behaviors to get from point to point, and create interesting behavior on the way
  • 47. Next time…  Organizing these lower level decisions into functional, autonomous agents (in a smart, extendable, debug-friendly way )  Questions? (can someone let Jordan know he can wake up now? kthx)

Editor's Notes

  1. Steering behaviors as low level movement logic, often used in combination with each other to create interesting behaviors for autonomous agents.A few weeks ago one of the AI programmers on Castlevania: LoS was talking about, well, AI in LoS. I found it interesting when he mentioned the birds on the crow witch was mostly a flocking behavior, with some tweaksFlocks of bats and herds of penguins in Batman Returns, movement of orc armies in Lord of the RingsWhile you won’t use everyone in every game, having an understanding of them and saving them in your back pocket can be extremely useful.
  2. It would be great to have a direct path to follow to get there, wouldn’t it? What do we need to accomplish this? First, we need a large
  3. If your graph isn’t going to utilize special terrain