Slides - University of Alberta

Goal-driven Mechanism in
Interim.2 Go Program
Ling Zhao
University of Alberta
Go Seminar on September 29, 2004
Outline
 Overview of the Interim Go program
 Framework
 Probe
 Examples
 Experimental results
 After thoughts
Overview of Interim.2 Program
 Developed by Bruce Wilcox and Walter
Reitman in 1970s (1972-1979), 7 manyears, 8K lines of LISP.
 At least 6 papers published based on this
program addressing different aspects:
structure & performance, pattern matching,
planning, knowledge representation, goaldriven analysis, etc.
Framework of Interim.2
MOVE
REFLEX
LOCAL.URGENT
UPDATE.POINT.TYPES
PLAY.JOSEKI
UPDATE.STRINGS
STRING.ATTACK.AND.DEFEND
UPDATE.LENSES
LINK.ATTACK.AND.DEFEND
UPDATE.LINKS
RE.EDGE.LINK
[PROBE]
UPDATE.GROUPS
VITAL.SHAPE.POINT
UPDATE.WEBS
CONTACT.FIGHT
UPDATE.SECTOR.LINES
DEVELOP.GROUP
UPDATE.TERRITORIES
KILL.CUTTING.STRING
UPDATE.TACTICAL.ANALYSES
EXTEND.AND.SQUEEZE
COUNTERATTACK
[PROBE]
CROSS.SECTOR.LINE
UPDATE.GROUP.STABILITY.ESTIMATES
STABILIZE.POTENTIAL.TERRITORY
RUN.TO
ATTACK.GROUP
WIPE.OUT
SHAPE.POINTS
[PROBE]
SQUEEZE
ENCLOSE
RUN.TOWARD.DEAD.GROUP
EXTEND.SECURE.INVADE
DEVELOP.POTENTIAL.TERRITORY
ENDGAME
Probe: overview
 Best-first problem-solving system inside
Interim.2.
 Designed to model how skilled human
player solve tactical problems by selective
search.
 Application: problem solving under
dynamic or adversarial environments
Probe: framework
Input: A tactical goal.
Output: Result of the goal,
move, dependency points &
areas, validity of the result.
PROBE
SEARCH
DEVELOP.GOALS
ENTRY.FAIL?
RESUME.GOALS?
RESULT.FAIL?
RESOUCES
[LIBERTY.ESTIMATEOR]
[QUICK.KILL]
GOAL.FAIL?
[BAD.SACRIFICE?]
SUBGOAL
GOAL.REPLY
REPLY.FAIL?
BACKUP.FAIL?
BACK.ONE
STORE
RESUME.GOALS?
Reinstate high-priority goals?
PROBE
SEARCH
DEVELOP.GOALS
ENTRY.FAIL?
RESUME.GOALS?
RESULT.FAIL?
RESOUCES
[LIBERTY.ESTIMATEOR]
[QUICK.KILL]
GOAL.FAIL?
[BAD.SACRIFICE?]
SUBGOAL
GOAL.REPLY
REPLY.FAIL?
BACKUP.FAIL?
BACK.ONE
STORE
RESULT.FAIL?
Check if the same source results
in a failure before.
RESOUCES
Collect information about the means available
for pursuing the current goal.
LIBERTY.ESTIMATEOR
Compute how many more liberties can be
gained by augmenting a string.
QUICK.KILL
Specialized look-ahead routine for ladder-kill
and forced search.
GOAL.FAIL?
Check if current goal fails or succeeds.
BAD.SACRIFICE?
Check if sacrificing current goal will
fail/succeed the original goal.
SUBGOAL
PROBE
SEARCH
DEVELOP.GOALS
ENTRY.FAIL?
RESUME.GOALS?
RESULT.FAIL?
RESOUCES
[LIBERTY.ESTIMATEOR]
[QUICK.KILL]
GOAL.FAIL?
[BAD.SACRIFICE?]
SUBGOAL
GOAL.REPLY
REPLY.FAIL?
BACKUP.FAIL?
BACK.ONE
STORE
Choose among various general methods
available for achieving a goal and
generate a subgoal if possible.
GOAL.REPLY
Propose a move based on current goal,
will call SEARCH again.
REPLY.FAIL?
Move filter.
BACKUP.FAIL?
If the current goal fail, check if backing
up to some antecedent goal.
BACK.ONE
Restore and try another resource.
Resources
 Organized as a set of packets. Each packet
contains all instances of one type of
resources.
 A packet has two lists: one for un-probed
instances and the other for those otherwise.
 Instances are ordered best first.
Resources: example

DEFEND-STRING/ATTACK-STRING goal
with some string S.
 Relevant resources:
a. liberty points of S,
b. enemy strings adjacent to S
Packet 1 for DEFEND-STRING
A packet containing all of the possible plays upon a
liberty point of S. Associated with each of these
points is the following information:
(a) the set of friendly strings adjacent to that point;
(b) the set of enemy strings adjacent to that point;
(c) the liberty count S will have if defender plays at
this point
(d) the liberty count S will have if attacker plays at
this point
Packets 2-4 for DEFEND-STRING
2. A packet containing all enemy strings
adjacent to S, ordered weakest first.
3. A packet containing all double-threat plays
4. A packet containing all enemy strings that
can be QUICK-KILLed.
Output of Probe
 Type of the call and target
 Result and move for attacker and defender
to play first respectively.
 A list of relevant points (must be empty).
 A list of relevant strings (only consider the
liberty count).
REFLEX
Example
After White move at C2:
LOCAL.URGENT ->
RE.EDGE.LINK ->
Get B2 and B3 from patterns ->
CAN’T CUT? for B3->
PROBE
LOCAL.URGENT
PLAY.JOSEKI
STRING.ATTACK.AND.DEFEND
LINK.ATTACK.AND.DEFEND
RE.EDGE.LINK
[PROBE]
VITAL.SHAPE.POINT
CONTACT.FIGHT
DEVELOP.GROUP
KILL.CUTTING.STRING
EXTEND.AND.SQUEEZE
COUNTERATTACK
CROSS.SECTOR.LINE
STABILIZE.POTENTIAL.TERRITORY
RUN.TO
ATTACK.GROUP
WIPE.OUT
SHAPE.POINTS
[PROBE]
SQUEEZE
ENCLOSE
RUN.TOWARD.DEAD.GROUP
EXTEND.SECURE.INVADE
DEVELOP.POTENTIAL.TERRITORY
ENDGAME
PROBE
SEARCH
DEVELOP.GOALS
ENTRY.FAIL?
RESUME.GOALS?
PROBE INPUT:
RESULT.FAIL?
Search type (CONNECTED-EXTENSION)
RESOUCES
Move considered (B2)
[LIBERTY.ESTIMATEOR]
Side to move (Black)
[QUICK.KILL]
Two endpoints for linkages (B2,C3)
GOAL.FAIL?
[BAD.SACRIFICE?]
1. Update all data structures for a
SUBGOAL
hypothetical black move at B2.
GOAL.REPLY
2. Initial goal for Black: DEFENDREPLY.FAIL?
LINK B2-C3
BACKUP.FAIL?
3. Initial goal for White: ATTACKBACK.ONE
LINK B2-C3
STORE
4. SEARCH -> DEVELOP.GOALS
5. ENTRY.FAIL? No.
6. RESOUCES
(a) moves to attack the linkage
(b) alternate path to tie the
two endpoints
(c) enemy strings adjacent to
both endpoints
7. GOAL.FAIL? No.
8. SUBGOAL? No.
Example
PROBE
SEARCH
DEVELOP.GOALS
ENTRY.FAIL?
RESUME.GOALS?
GOAL.REPLY: get B3 from resource(a)
RESULT.FAIL?
REPLY.FAIL for B3? No.
RESOUCES
return to DEVELOP.GOALS
[LIBERTY.ESTIMATEOR]
return to SEARCH
[QUICK.KILL]
SEARCH calls MOVE to place another
GOAL.FAIL?
hypothetical white move B3.
[BAD.SACRIFICE?]
DEVELOP.GOALS -> ENTRY.FAIL? ->
SUBGOAL
RESOUCES -> GOAL.FAIL? -> SUBGOAL
GOAL.REPLY
SUBGOAL proposes a subgoal of
REPLY.FAIL?
killing B3 to advance the original
BACKUP.FAIL?
goal. SUBGOAL calls QUICK.KILL to
BACK.ONE
check feasibility.
STORE
SUBGOAL adds ATTACK-STRING and
DEFEND-STRING GOALS to goal stacks.
Goes back to DEVELOP.GOALS.
ENTRY.FAIL? ->RESOUCES-> GOAL.FAIL?
GOAL.FAIL? B3 is killable ->
BAD.SACRIFICE? B3 is essential.
Goal fails for attempt at B3
Back up and try another resource.
No more moves.
Return result: Linkage safe.
Example
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
Discussion
 Resources: rule-based static analysis to propose
moves
 A goal can be assisted with subgoals, but no
coordination between subgoals. No necessary
conditions between goal and subgoals, which
resulted in many complexities.
 One goal can have several subgoals, and although
they all will be evaluated, it seems only one will
be actually tried (put into goal stacks).
Experimental results
 Claimed about 27 kyu for the program.
 278 test positions from 2 test games.
 Classified into 3 categories by Wilcox: easy (10
kyu rank), moderate (4 kyu rank), and hard (1 dan
rank).
 Accuracy rate (including both results and
reasoning):
easy: 88%, moderate: 56%, hard: 100%
but only 3 hard positions.
After thoughts
 A first complete goal-driven Go program.
 Strategic framework: rule-based system
 Tactical layer: static analysis (patterns,
rules) and look ahead.
 Very constrained goal-driven search.
 No real decomposition for goals.
 Experimental results seem very impressive.
References
 Walter Reitman and Bruce Wilcox. The structure
and performance of the Interim.2 Go program. In
Proceedings of the Joint Conference on Artificial
Intelligence, pages 711 - 719, 1979.
 Walter Reitman and Bruce Wilcox. Modeling
tactical analysis and problem solving in Go. In
Proceedings of the Tenth Annual Pittsburg
Conference on Modelling and Simulation, pages
2133 - 2148, Pittsburg, 1979. Instrument Society
of America.