Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 488/588 Bruce R. Maxim UM-Dearborn

Similar presentations


Presentation on theme: "CIS 488/588 Bruce R. Maxim UM-Dearborn"— Presentation transcript:

1 CIS 488/588 Bruce R. Maxim UM-Dearborn
Reactive Approach CIS 488/588 Bruce R. Maxim UM-Dearborn 12/8/2018

2 Reactive For reactive AI the output is always the same for a given input (deterministic) Its behavior is completely predictable for a specific situation Nondeterministic reactive AI would require the addition of memory so that it current action could depend on its state and the current input (and even its last action in this state if you wish) 12/8/2018

3 Planning Basics Planning is particularly desirable when a problem domain has a well-defined set of operators and easily determined states Often times accomplishing a task is reduced to asking “which operators can be used?” It is wise to pick operators that move you closest to your goal 12/8/2018

4 Basics If there are obstacles the task is modified to become “how do we remove obstacles?” Result of planning will be a plan in which the task accomplishing every goal has been reduced to a list of primitive operators Often times planning and executive are interleaved 12/8/2018

5 Problem Reduction Technique for achieving goals in a problem space by generating and achieving subgoals When presented with a problem the problem reducer will need to find a plan to solve the problem Finding a plan might be thought of as being a type of “heuristic search” in which the operators add detail by attaching plans for goals and coordinating steps 12/8/2018

6 Problem Reduction Coordination involves Good for top-level
Choosing harmonious plans for simultaneous subgoals Choosing the order of execution for subplans Good for top-level Limitation of problem reduction is that it does not always take subplan interactions into account 12/8/2018

7 Algorithm Initialize graph to starting node
Loop until starting node is solved or until cost exceeds futility Traverse graph using current best path and keep track of nodes on path not solved or not yet expanded Pick an unexpanded node if no successor then assign futility as node value else add node successors to graph and estimate value of node f(x) = y(x) + h’(x) // h’ is underestimator note: nodes where h'(x) = 0 are solved Update f'(x) of newly expanded node based on successor values 12/8/2018

8 Problem Reduction Advantage Disadvantage
Trades the old problem of finding an operator sequence (e.g. a path through states) for the new problem of coordinating operator sequences Disadvantage Requires more domain knowledge than heuristic search 12/8/2018

9 Problem Reduction May require a large number of plans and the plans themselves may be large Particularly useful if problem space can be represented as an and/or graph Recall that and/or graphs are useful in answering how and why questions 12/8/2018

10 And/Or Tree Goal: Acquire TV Steal TV Buy TV and Earn Money Get Job
12/8/2018

11 Problem Reduction Important to make plan finding phase as efficient as possible How are plans/operators found? Preconditions Post conditions Good candidate for top level program since it combines general plan coordination techniques with library of specific plans 12/8/2018

12 Planning in Games Plans can be built in a reactive manner
Pathfinding in uneven terrain is best done with planning techniques that search for the best available path Pathfinding requires a world map and lots of storage Reactive pathfinding would take longer, might not find the optimal path, but would use far less storage (only local terrain information is needed) 12/8/2018

13 Reactive Substitutes for Planning
There are very few cases in games where planning is necessary Reactive strategies may appear very complex when used for high level tactical decisions Obstacle avoidance could be viewed handled reactively as long as the agent avoids getting stuck 12/8/2018

14 Reactive Deterministic Game Techniques
Scripts (small programs used to compute a result given some input parameters Rule-based systems (collections of if..then rules used to manipulate variables) Finite-state machines (select next state action based on current input values) 12/8/2018

15 Reactive Advantages for Animats
Embodiment (reactive behaviors based on interpreting local information to select actions) Learning (many learning techniques are based on acquiring reactive mappings between inputs and behavior) 12/8/2018

16 Architectures Components are best viewed as black boxes with details of AI unknown to its users Architectural Styles Monolithic (single component architecture) Flat (many components exist in parallel) Hierarchical (components nested inside one another) Reducing complexity is the deciding factor used to select an architectural style 12/8/2018

17 Game AI Decomposition Structural Behavioral Goal
Splits solution according to the function (movement, weapon handling) of each component Behavioral Based on system activities or modes (hunting, fleeing, collecting ammo) different component for each behavior (very appropriate for computer games) Goal Create goal trees to assist in decision making 12/8/2018

18 Component Connection Types Attribution
Independent sum (components connected to different outputs to avoid conflicts) Combination (outputs from different components blended together to make final result) Suppression (strong components get priority weak components ignored) Sequential attribution (arbitration used to ensure output of different components over time – fair scheduling) 12/8/2018

19 Example - 1 Subsumation Horizontal, hierarchical layers
Higher layer outputs over ride lower layer outputs Behavior-based decomposition Uses flat organization Output suppression 12/8/2018

20 Example - 2 Voting system
Set of distributed components connected to a smaller vote counting component Output with the most votes wins Uses functional decomposition Flat organization Combination used to merge outputs 12/8/2018


Download ppt "CIS 488/588 Bruce R. Maxim UM-Dearborn"

Similar presentations


Ads by Google