VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1 ]
Subject: Að varðveita leik í AlphaBeta


Author:
Orri
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 14:39:49 04/13/04 Tue

Ég hef verið að skoða Alpha Beta reikniritið í greininni sem þú vísaðir í (The Games Computers Play) og líka greininni af netinu (Minimax and Alpha-Beta template). Ég hef reynt að útfæra eftir bestu getu Alpha Beta reikniritið út frá fyrri greininni en ég er í vandræðum með að varðveita leikinn sem reikniritið velur (það er ekki gert ráð fyrir því í útlistuninni í greininni). Ég prófaði að hafa það í eftirfarandi hluta:

/* Update best value found so far */
if ( type == MAXNODE )
alpha = MAX ( value, alpha )
else beta = MIN ( value, beta )

í staðinn fyrir þennan hluta setti ég

if ( type == MAXNODE )
if ( value >= alpha )
alpha = value
bestmove = currentmove
else
if ( value <= beta )
beta = value
bestmove = currentmove

En því miður virkar þetta ekki... ég útfærði MiniMax útgáfu útfrá reikniritinu sem þú gafst upp á vikublaði 13 til þess að bera það saman og AlphaBeta reikniritið sem ég útfærði leikur ekki sömu leikjunum og MiniMax reikniritið.

Ætti ekki MiniMax og AlphaBeta reikniritin að finna sömu leiki en AlphaBeta bara á skemmri tíma en MiniMax?

Einnig ætti AlphaBeta að gefa sömu leiki og MiniMax ef maður tekur út ,,AlphaBeta cut-off'' er það ekki?

þ.e. að commenta út:

/* Check for a cut-off. Minimax without this line of code */
if ( alpha >= beta ) break

Er einhver með einhverjar hugmyndir?

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Replies:
Subject Author Date
Re: Að varðveita leik í AlphaBetaNo name14:50:13 04/13/04 Tue
Re: Að varðveita leik í AlphaBetaHjálmtýr18:53:03 04/13/04 Tue
Re: Að varðveita leik í AlphaBetaHjálmtýr00:41:13 04/14/04 Wed
Re: Að varðveita leik í AlphaBetaNo name14:16:17 04/14/04 Wed


Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]


Forum timezone: GMT+0
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.