人工智能相关资源,有论文程序等
文件大小: 14160k
源码售价: 10 个金币 积分规则     积分充值
资源说明:有拼图游戏,几个可选 有人工智能论文 bestMove(int p, int*v) {   int i;     int lastTie;                      int lastMove;                     int subV;                                    /*First, check for a tie*/                 if (isTie()) {                    *v=0;                     return(0);                  }; /*If not a tie, try each potential move*/  for (*v=-1, lastTie=lastMove=-1,i=0;i<9;i++)   {    /*If this isn't a possible, skip it*/              if (board[i]!=0) continue;    /* Make the move. */     lastMove=i;      board[i]=p;                                 /* Did it win? */                            if (hasWon(p)) *v=1;                          else{                                 /*If not, find out how good the other side can do*/      bestMove(-p,&subV);                          /* If they can only lose, this is still a win.*/       if (subV==-1) *v=1;           /* Or, if it's a tie, remember it. */                 else if (subV==0){                            *v=0;                  lastTie=i;            };                                  };                               /* Take back the move. */                       board[i]=0;           /*If we found a win, return immediately      (can't do any better than that)*/        if (*v==1) return(i);                      /*If we didn't find any wins, return a tie move.*/            if (*v==0) return(lastTie);                       /*If there weren't even any ties, return a loosing move.*/        else return(lastMove);  };    
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。