Next: , Previous: Move Valuation, Up: Overview


4.4 Detailed Sequence of Events

First comes the sequence of events when examine_position() is run from genmove(). This is for reference only.

purge_persistent_caches()
make_worms():
  compute_effective_sizes()
  compute_unconditional_status()
  find_worm_attacks_and_defenses():
    for each attackable worm:
      set worm.attack
      change_attack() to add the attack point
    find_attack_patterns() to find a few more attacks
    for each defensible worm:
      set worm.attack
      change_defense() to add the defense point
    find_defense_patterns() to find a few more defense moves
    find additional attacks and defenses by testing all
      immediate liberties
  find higher order liberties (for each worm)
  find cutting stones (for each worm)
  improve attacks and defenses: if capturing a string defends
    another friendly string, or kills an unfriendly one, we
    add points of defense or attack. Make repairs if adjacent
    strings can both be attacked but not defended.
  find worm lunches
  find worm threats
  identify inessential worms (such as nakade stones)
compute_worm_influence():
  find_influence_patterns()
  value_influence()
  segment_influence()
make_dragons():
  find_cuts()
  find_connections()
  make_domains() (determine eyeshapes)
  find_lunches() (adjacent strings that can be captured)
  find_half_and_false_eyes()
  eye_computations(): Compute the value of each eye space.
    Store its attack and defense point.
  analyze_false_eye_territory()
  for each dragon compute_dragon_genus()
  for each dragon compute_escape() and set escape route data
  resegment_initial_influence()
  compute_refined_dragon_weaknesses() (called again after owl)
  for each dragon compute_crude_status()
  find_neighbor_dragons()
  for each dragon compute surround status
  for each weak dragon run owl_attack() and owl_defend()
    to determine points of attack and defense
  for each dragon compute dragon.status
  for each thrashing dragon compute owl threats
  for each dragon compute dragon.safety
  revise_inessentiality()
  semeai():
    for every semeai, run owl_analyze_semeai()
    find_moves_to_make_seki()
  identify_thrashing_dragons()
  compute_dragon_influence():
    compute_influence()
    break_territories() (see Break Ins)
  compute_refined_dragon_weaknesses()

Now a summary of the sequence of events during the move generation and selection phases of genmove(), which take place after the information gathering phase has been completed:

estimate_score()
choose_strategy()
collect_move_reasons():
  worm_reasons(): for each attack and defense point add a move reason
  semeai_reasons(): for each dragon2.semeai point add a move reason
  owl_reasons(): for each owl attack and defense point add a move reason
  break_in_reasons(): for each breakin found add a move reason
fuseki()
break_mirror_go()
shapes(): match patterns around the board (see Patterns Overview)
combinations(): look for moves with a double meaning and other tricks
  find_double_threats()
  atari_atari()
review_move_reasons()
if ahead and there is a thrashing dragon, consider it
  alive and reconsider the position
endgame_shapes()
endgame()
if no move found yet, revisit any semeai, change status of dead opponent
  to alive, then run shapes() and endgame_shapes() again
if no move found yet, run fill_liberty()