gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] stepped on a bug, but


From: yiwen chu
Subject: [gnugo-devel] stepped on a bug, but
Date: Tue, 29 Jul 2003 15:08:06 -0400

loaded a game and on the next move (171), tried to list dragons. windows error msg came up abnormal program termination, in the system window -
"
***assertion failure:
C:\temp\gnugo-3.2\engine\move_reasons.c:466 - k<40 near PASS***
"
seed 1059504843

however it is important to note i have been editing dragon.c so when i call listdragons it outputs the board to a file and a safety value of the current dragon. the purpose of my code is to output the board with 0 for empty, 1 for black, 3 for white, 2 at origin of current black dragon or 4 at origin of current white dragon. i still need to adjust it so the entire focused dragon is of 2's or 4's depending on the selection. then, work on training a neural network to recognize safety of groups. regardless if it works, it is just a research project i am working on for a highschool summer program, but i think i could work on it afterwards as well, as it has become very interesting.


this is the code: starting with the original, mine marked off.
line 1190:

 gprintf("%o\n");
 for (pos = BOARDMIN; pos < BOARDMAX; pos++) {
   struct dragon_data *dd = &(dragon[pos]);
   struct dragon_data2 *d2;

   if (!IS_STONE(board[pos]))
     continue;

   d2 = &(dragon2[dd->id]);

   if (dd->origin == pos) {
//*************************************************************************
************************************//
           f2 = fopen("theout.txt", "a");
         //  fprintf(f2, "DRAGON \n\n");
        
                for(rty=0; rty<BOARDMAX; rty++){
                        jar=0;
                        if(board[rty]== BLACK)
                                jar=1;
                        else if(board[rty]== WHITE)
                                jar=3;
                        else if(board[rty]== EMPTY)
                                jar=0;
                        if(jar==3&&rty==dd->origin)
                        {
                                jar=4;
                                rat=(double)compute_dragon_status(rty);
                        }
                                if(jar==1&&rty==dd->origin)
                        {
                                jar=2;
                                rat=(double)compute_dragon_status(rty);
                        }

                        fprintf(f2,"%d", jar);
                }
                if(rat==1)
                        rat=0.9;

                if(rat==3)
                        rat=0.5;

                if(rat==0)
                        rat=0;

                fprintf(f2,"\n%f\n",rat);
                fclose(f2);
//*************************************************************************
************************************//
gprintf("%1m : %s dragon size %d (%f), genus %d, half eyes %d, escape factor %d, status %s, matcher status %s, moyo size %d safety %s",
              pos,
              board[pos] == BLACK ? "B" : "W",
              dd->size,
              dd->effective_size,
              d2->genus,
              d2->heyes,
              d2->escape_route,
              snames[dd->status],
              snames[dd->matcher_status],
              d2->moyo,
              safety_names[d2->safety]);


~alex styler (pgss 2003)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]