Ticket #202: gunnar_7_12.13.diff

File gunnar_7_12.13.diff, 1.1 kB (added by gunnar, 8 months ago)

Add strategical value for semeai moves.

  • engine/value_moves.c

     
    28282828      case SEMEAI_MOVE: 
    28292829        /* 
    28302830         * The strategical value of winning a semeai is 
    2831          * own dragons (usually) becomes fully secure, while adjoining 
     2831         * own dragons (usually) become fully secure, while adjoining 
    28322832         * enemy dragons do not. 
    28332833         * 
    2834          * FIXME: Valuation not implemented at all yet.  
     2834         * FIXME: Valuation is only crudely implemented as a 
     2835         *        fall-through to strategic attack and defense moves. 
     2836         *        This is not satisfactory and should be changed in 
     2837         *        the future. 
    28352838         */ 
    2836  
    2837         break; 
    28382839         
    28392840      case STRATEGIC_ATTACK_MOVE: 
    28402841      case STRATEGIC_DEFEND_MOVE:        
     
    28482849         * 
    28492850         * FIXME: Improve the implementation. 
    28502851         */ 
    2851         aa = move_reasons[r].what; 
     2852        if (move_reasons[r].type == SEMEAI_MOVE) 
     2853          aa = DRAGON2(move_reasons[r].what).semeai_defense_target; 
     2854        else 
     2855          aa = move_reasons[r].what; 
    28522856 
    28532857        /* FIXME: This value cannot be computed without some 
    28542858         * measurement of how the actual move affects the dragon. The