| www.delorie.com/gnu/docs/gnugo/gnugo_197.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
static void
accumulate_influence(struct influence_data *q, int m, int n, int color)
Limited in scope to `influence.c', this is the core of the influence function. Given the coordinates and color of an influence source, it radiates the influence outwards until it hits a barrier or the strength of the influence falls under a certain threshold. The radiation is performed by a breadth first propagation, implemented by means of an internal queue.
void add_influence_source(int pos, int color, float strength, float attenuation, struct influence_data *q)
Adds an influence source at position pos with prescribed strength and attenuation. color can beBLACK,WHITEor both. If there already exists an influence source of the respective color at pos that is stronger than the new one, we do nothing.
void influence_mark_non_territory(int pos, int color)
Called from actions for t patterns. Marksposas not being territory forcolor.
int influence_get_moyo_size(int pos, int color)
Return the size of the moyo around pos.
void influence_get_moyo_segmentation(int opposite, struct moyo_data *moyos)
Export the moyo segmentation. If opposite is true, then
initial_opposite_influence is used, otherwise initial_influence.
void compute_initial_influence(int color, int dragons_known)
Compute the influence before a move has been made, which can later be compared to the influence after a move. Assume that the other color is in turn to move.
void resegment_initial_influence()
Redo the segmentation of the initial influence.
void compute_escape_influence(char goal[BOARDMAX], int color, int escape_value[BOARDMAX], int dragons_known)
Assume that the stones marked by the goal array do not generate influence and compute influence. Influence based escape values are returned in the escape_value array.
int influence_territory_color(int pos)
Return the color who has territory atpos, orEMPTY.
int influence_moyo_color(int pos)
Return the color who has moyo at pos, or EMPTY.
int influence_moyo_color_opposite(int pos)
Return the color who has moyo at pos, or EMPTY, using influence
computed with the opposite color to move.
int influence_area_color(int pos)
Return the color who has area at pos, or EMPTY.
float influence_delta_territory(int pos, int color, char saved_stones[BOARDMAX], float *followup_value)
Compute the difference in territory made by a move by color at pos.
This also includes the changes in moyo and area. In experimental-influence
mode, followup_value must not be a NULL pointer, and the followup_value will
be returned there.
float influence_estimate_score(float moyo_coeff, float area_coeff)
Estimate the score. A positive value means white is ahead. The score is estimated from the initial_influence, which must have been computed in advance. The score estimate does not include captured stones (i.e., the ones having been removed from the board) or komi. moyo_coeff and area_coeff are the relative weights to be used for the moyo and area difference respectively.
void debug_influence_move(int i, int j)
Print the influence map when we have computed influence for the
move at (i, j).
void get_initial_influence(int color, int dragons_known, float white_influence[BOARDMAX], float black_influence[BOARDMAX], int influence_regions[BOARDMAX])
Compute initial influence and export it. The color parameter tells who is in turn to move.
void get_move_influence(int move, int color, char saved_stones[BOARDMAX], float white_influence[BOARDMAX], float black_influence[BOARDMAX], int influence_regions[BOARDMAX])
Compute influence after a move and export it.
void print_initial_influence(int color, int dragons_known)
Compute initial influence and print it. Notice that it's assumed that the printmoyo global tells what information to print. The color parameter tells who is in turn to move.
void print_move_influence(int pos, int color, char saved_stones[BOARDMAX])
Compute influence after doing a move and print it. Notice that it's assumed that the printmoyo global tells what information to print.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |