Download presentation
Presentation is loading. Please wait.
1
Incomplete Information General Game PlayingLecture 5 Michael Genesereth Spring 2005
2
2 Goal States c be f h i dgj a k
3
3 Simultaneous Actions c be f h i dgj a k b/b b/a a/a b/ba/b b/a a/a a/ba/a a/b a/a a/b a/a b/b a/a b/b a/b b/a
4
4 Maze World
5
5 Maze World State Machine
6
6 Initial State Uncertainty
7
7 Maze World Percepts
8
8 Dealing With Incomplete Information Approaches: Coercion Conditional Plans Interleaved Planning and Execution In the face of incomplete information, one searches state set space rather than state space. Representations: Extensive (explicit state sets) Intensional (implicit state sets via properties)
9
9
10
10 Tree Expansion function expands (player nodes) (do ((i 1) (node)) ((or (> i nodes) (null (fringe player))) 'done) (setq node (car (fringe player))) (setf (fringe player) (cdr (fringe player))) (unless (score node) (setq i (1+ i)) (setf (fringe player) (nconc (fringe player) (expandnode node))))))
11
11 Tree Expansion (defun expands (player, nodes) (do ((i 1) (node)) ((or (> i nodes) (null (fringe player))) 'done) (setq node (car (fringe player))) (setf (fringe player) (cdr (fringe player))) (unless (score node) (setq i (1+ i)) (setf (fringe player) (nconc (fringe player) (expandnode node))))))
12
12 Node Expansion function expand (node) (let (player role data al nl) var player=player(node); var role=role(player) for action in legals(role,node) do old = data(node); data(node) = consaction(role,action,old); data = sort(simulate(node),#'minlessp); data(node) = old; if new = gethash(data,hasher(player)) then new else {new = node(player,data,theory,node); gethash(data,hasher(player)) = new; if termp(new) then score(new)= reward(role,new); (setf (score new) (reward (role player) new))) (setq nl (cons new nl)))) (setq al (acons (car l) new al)))))
13
13 Node Expansion (defun expandnode (node) (let (player role data) (setq player (player node)) (setq role (role player)) (do ((l (legals role node) (cdr l)) (al) (nl)) ((null l) (setf (alist node) (nreverse al)) (nreverse nl)) (setq old (data node)) (setf (data node) (consaction role (car l) (data node))) (setq data (sort (simulate node) #'minlessp)) (setf (data node) old) (cond ((setq new (gethash data (hasher player)))) (t (setq new (makeminnode player data (theory node) node)) (setf (gethash data (hasher player)) new) (when (termp new) (setf (score new) (reward (role player) new))) (setq nl (cons new nl)))) (setq al (acons (car l) new al)))))
14
14 Best Move (defun bestmove (node) (do ((l (alist node) (cdr l)) (best) (score)) ((null l) (or best (caar (alist node)))) (setq score (minscores (cdar l))) (cond ((equal score 100) (return (caar l))) ((equal score 0)) ((not best) (setq best (caar l))))))
15
15 Node Evaluation (defun maxscore (node) (cond ((score node)) ((null (alist node)) nil) (t (do ((l (alist node) (cdr l)) (score) (max 0)) ((null l) max) (setq score (maxscores (cdar l))) (cond ((equal score 100) (return 100)) ((not (numberp score)) (setq max nil)) ((not max)) ((> score max) (setq max score)))))))
16
16 Natural Deduction
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.