Welcome to GameHourz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

mistake in AIAMA python code

 
   Game Forums (Home) -> AI Games RSS
Next:  Pleiades High Score doesn't update until a new ga..  
Author Message
Tom Hall

External


Since: Apr 09, 2006
Posts: 1



(Msg. 1) Posted: Sun Apr 09, 2006 3:55 pm
Post subject: mistake in AIAMA python code
Archived from groups: comp>ai>games, others (more info?)

im no expert so im not 100% these are errors

def play_game(game, *players):
"Play an n-person, move-alternating game."
state = game.initial
while True:
for player in players:
move = player(game, state)
state = game.make_move(move, state)
if game.terminal_test(state):
return game.utility(state, players[0]) *******this
line


and (within class TicTacToe)

def utility(self, state): *********** i this changed to (self,
state, player)
"Return the value to X; 1 for win, -1 for loss, 0 otherwise."
return state.utility

dont know if that is considered trivial, but i certainly expected
t = TicTacToe()
first = random_player
sec = random_player
play_game(t, first, sec)

to work out of the box

as i say, im far from expert and dont have the book (yet)

also, if i do
t = TicTacToe()
first = random_player
sec = alphabeta_player
play_game(t, first, sec)

sec wins less than i think he should

 >> Stay informed about: mistake in AIAMA python code 
Back to top
Login to vote
pinoyangtumapos3




Joined: Nov 20, 2006
Posts: 50



(Msg. 2) Posted: Wed Nov 22, 2006 4:51 pm
Post subject: Re: mistake in AIAMA python code [Login to view extended thread Info.]

Hey I received an email and a link in it, they have great services. They
Offer power leveling, rentals, they buy and sell, they can even trade. Check
Out http://oloot.com

 >> Stay informed about: mistake in AIAMA python code 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
A* and multi-goals - Hello, I am using A* to find the shortest path in a 3D environment, I have waypoints at each intersections, rooms, interesting points to create the graph. At the moment I can select a start and goal node, the A* algorithm do the rest and my character..

AI and C# - HI all... does anybody know a book about AI, which includes examples in c#? thx for reading ;)

2006 Chatterbox Challenge - The online voting for the 2006 Chatterbox Challenge at www.chatterboxchallenge.com has begun. Visit the site and vote for the 3 best bots. No registeration or anything required to vote. Voting ends 4/30/06. Wendell

TBC Fast Package(1-70) - Any Class Free 2000G - Wow level50-60,30g per level level60-70,150g per level. Dear Sir or Madam Hot Sale!For all of our customers,the news and olds,www.game-powers.com are some Special Package! We now provide Powerleveling measured by..

bigtest - bigtest
   Game Forums (Home) -> AI Games All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]