Look here: http://desktop.google.com/plugins/i/tictactoe.html There is a TicTacToe gadget, that has a computer AI. perhaps you can look at this...
2009/2/19 blhc <[email protected]> > > heres the pseudocode > int negaMax( int depth ) { > if ( depth == 0 ) return evaluate(); > int max = -oo; //infinity > for ( all moves) { > score = -negaMax( depth - 1 ); > if( score > max ) > max = score; > } > return max; > } > > from what Ive understand so far is that each box in the tic tac toe > must be assigned a value? then the value is brought as int depth into > the negamax function. > im having trouble in understanding how to assign those values. else > what is int depth mention in this pseudocode? > > Thanks! > Lee > > On Feb 19, 9:54 am, "Benjamin [API Guru]" <[email protected]> > wrote: > > You should be able to find books or webpages which describe the > > negamax and minimax algorithms. It shouldn't be too hard to implement > > it in Javascript. The hardest part is probably to integrate it into > > your existing code. I hope it is modular enough. > > > > Looking forward to playing it! > > > > Good luck, > > Benjamin > > > > On Feb 19, 2:43 am, blhc <[email protected]> wrote: > > > > > As in the subject how to implement this algorithm for google dekstop > > > gadget? a basic human vs human player option has been done. Now for > > > human vs computer AI. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Desktop Developer Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Desktop-Developer?hl=en -~----------~----~----~----~------~----~------~--~---
