6 Decision- -Making Making MVC (revisited) 6 Decision MVC - - PDF document

6 decision making making mvc revisited 6 decision mvc
SMART_READER_LITE
LIVE PREVIEW

6 Decision- -Making Making MVC (revisited) 6 Decision MVC - - PDF document

6 Decision- -Making Making MVC (revisited) 6 Decision MVC (revisited) decision decision - - m m a a king and games king and games model state instance core structures levels of decision levels of decision- -making


slide-1
SLIDE 1

1

§6 Decision §6 Decision-

  • Making

Making

  • decision

decision

  • m

a king and games m a king and games

  • levels of decision

levels of decision-

  • making

making

  • modelled knowledge

modelled knowledge

  • method

method

  • example methods

example methods

  • finite state machines

finite state machines

  • flocking algorithms

flocking algorithms

  • influence maps

influence maps

  • this will not be a comprehensive guide into decision

this will not be a comprehensive guide into decision

  • making!

making!

MVC (revisited) MVC (revisited)

control logic driver proto-view rendering state instance core structures input device action configuration instance data synthetic view synthetic player script

  • utput

device human player

  • ptions

perception

model view controller

AI system AI system

World

Pattern recognition Observed events Observed events and states and states Decision- making system Requested Requested actions actions Possible actions Possible actions Primitive events Primitive events and states and states Previous primitives

Three perspectives for decision Three perspectives for decision-

  • making in computer games

making in computer games

  • level of decision

level of decision-

  • making

making

  • strategic, tactical, operational

strategic, tactical, operational

  • use of the modelled knowledge

use of the modelled knowledge

  • prediction, production

prediction, production

  • methods

methods

  • ptimization, adaptation
  • ptimization, adaptation

Level of decision Level of decision-

  • making

making

  • strategic

strategic

  • what should be done

what should be done

  • tactical

tactical

  • how to actuate it

how to actuate it

  • perational
  • perational
  • how to carry it out

how to carry it out

Strategic level Strategic level

  • long

long-

  • term decisions

term decisions

  • infrequent → can be computed offline or in the

infrequent → can be computed offline or in the background background

  • large amount of data, which is

large amount of data, which is filtered to bring filtered to bring forth the essentials forth the essentials

  • quantization problem?

quantization problem?

  • speculative (what

speculative (what-

  • if scenarios)

if scenarios)

  • the cost of a wrong decision is high

the cost of a wrong decision is high

slide-2
SLIDE 2

2

Tactical level Tactical level

  • medium

medium-

  • term decisions

term decisions

  • intermediary between strategic and operational

intermediary between strategic and operational levels levels

  • follow the plan made on the strategic level

follow the plan made on the strategic level

  • convey the feedback from the operational level

convey the feedback from the operational level

  • considers a group of entities

considers a group of entities

  • a selected set of data to be scrutinized

a selected set of data to be scrutinized

  • co

co

  • peration within the group
  • peration within the group

Operational level Operational level

  • short

short-

  • term decisions

term decisions

  • reactive, real

reactive, real

  • time response

time response

  • concrete and closely connected to the game

concrete and closely connected to the game world world

  • considers individual entities

considers individual entities

  • the cost of a wrong decision is relatively low

the cost of a wrong decision is relatively low

  • f course not to the entity itself
  • f course not to the entity itself

Use of the modelled knowledge Use of the modelled knowledge

  • time series data

time series data

  • world = a generator of events and states, which

world = a generator of events and states, which can be labelled with symbols can be labelled with symbols

  • prediction

prediction

  • what the generator will produce next?

what the generator will produce next?

  • production

production

  • simulating the output of the generator

simulating the output of the generator

  • how to cope with uncertainty?

how to cope with uncertainty?

Prediction Prediction

Modeller

maximum probability

Generator

Production Production

Modeller

random selection from probability distribution

Methods: Optimization Methods: Optimization

  • elements:

elements:

  • bjective function to be maximized/minimized
  • bjective function to be maximized/minimized
  • variables affecting the value of the objective function

variables affecting the value of the objective function

  • constraints limiting feasible variable values

constraints limiting feasible variable values

  • goal: find among the feasible solutions the one

goal: find among the feasible solutions the one that gives an optimum value for the objective that gives an optimum value for the objective function function

  • time consuming?

time consuming? → heuristic rules to guide the search → heuristic rules to guide the search

slide-3
SLIDE 3

3

Methods: Optimization (cont’d) Methods: Optimization (cont’d)

  • hill

hill-

  • climbing

climbing

  • how to escape local optima?

how to escape local optima?

  • tabu search

tabu search

  • simulated annealing

simulated annealing

  • genetic algorithms

genetic algorithms

  • multiple search traces

multiple search traces

  • swarm algorithms

swarm algorithms

Methods: Adaptation Methods: Adaptation

  • ability to make appropriate responses to

ability to make appropriate responses to changed circumstances → learning changed circumstances → learning

  • searches for a function behind given solutions

searches for a function behind given solutions

  • ptimization: solution for a given function
  • ptimization: solution for a given function
  • affecting factors are unknown or dynamic

affecting factors are unknown or dynamic

  • pattern recognition

pattern recognition

Methods: Adaptation (cont’d) Methods: Adaptation (cont’d)

  • neural networks

neural networks

  • training

training

  • supervised learning

supervised learning

  • unsupervised learning (e.g., self

unsupervised learning (e.g., self-

  • organizing maps)
  • rganizing maps)
  • execution

execution

  • hidden Markov model

hidden Markov model

  • recurring structures

recurring structures

Soft computing Soft computing

  • L. Zadeh: methodologies that try to solve problems
  • L. Zadeh: methodologies that try to solve problems

arising from the complexity of the natural world arising from the complexity of the natural world

  • approximation

approximation

  • partial truth

partial truth

  • imprecision

imprecision

  • uncertainty

uncertainty

  • computer games have used ‘hard’ computing

computer games have used ‘hard’ computing

  • as the game worlds get more complex, perhaps soft

as the game worlds get more complex, perhaps soft computing methods would suit better computing methods would suit better

Soft computing methods Soft computing methods

  • probabilistic reasoning

probabilistic reasoning

  • genetic algorithms

genetic algorithms

  • Bayesian networks

Bayesian networks

  • artificial neural networks

artificial neural networks

  • back

back

  • p

ropagation networks p ropagation networks

  • self

self

  • rganizing maps
  • rganizing maps
  • fuzzy logic

fuzzy logic

  • fuzzy sets

fuzzy sets

  • approximate reasoning

approximate reasoning

Finite state machine (FSM) Finite state machine (FSM)

  • components:

components:

  • states

states

  • transitions

transitions

  • events

events

  • actions

actions

  • state chart: fully connected directed graph

state chart: fully connected directed graph

  • vertices = states

vertices = states

  • edges = transitions

edges = transitions

slide-4
SLIDE 4

4

Properties of FSM Properties of FSM

1. 1.

acceptor acceptor

  • does the input sequence fulfil given criteria?

does the input sequence fulfil given criteria?

2. 2.

transducer transducer

  • what is the corresponding output sequence for a

what is the corresponding output sequence for a given input sequence? given input sequence?

3. 3.

computator computator

  • what is the sequence of actions for a given input

what is the sequence of actions for a given input sequence? sequence?

  • these properties are independent!

these properties are independent!

Mealy and Moore machines Mealy and Moore machines

  • theoretical cathegories for FSMs

theoretical cathegories for FSMs

  • Mealy machine

Mealy machine

  • actions are in transitions

actions are in transitions

  • the next action is determined by the current state and the

the next action is determined by the current state and the

  • ccurring event
  • ccurring event
  • more compact but harder to comprehend

more compact but harder to comprehend

  • Moore machine

Moore machine

  • actions are in states

actions are in states

  • the next action is determined by the next state

the next action is determined by the next state

  • helps to understand and use state machines in UML

helps to understand and use state machines in UML

Implementation Implementation

  • design by contract

design by contract

  • two parties: the supplier and the client

two parties: the supplier and the client

  • formal agreement using interfaces

formal agreement using interfaces

  • FSM software components

FSM software components

  • environment: view to the FSM (client)

environment: view to the FSM (client)

  • context: handles the dynamic aspects of the FSM

context: handles the dynamic aspects of the FSM (supplier) (supplier)

  • structure: maintains the representation of the FSM

structure: maintains the representation of the FSM (supplier) (supplier)

Noteworthy Noteworthy

  • structure is static

structure is static

  • hard to modify

hard to modify

  • reactivity

reactivity

  • memoryless representation of all possible walks from the

memoryless representation of all possible walks from the initial state initial state

  • states are mutually exclusive: one state at a time

states are mutually exclusive: one state at a time

  • not for continuous or multivalued values

not for continuous or multivalued values

  • combinatorial explosion

combinatorial explosion

  • if the states and events are independent

if the states and events are independent

  • risk of total rewriting

risk of total rewriting

  • high cohesion of actions

high cohesion of actions