ICM算法(Java版本)
/*** \param payouts Payout structure, e.g.: new double[]{0.5,0.3,0.2}* \param stacks Player stacks* \param player Index of selected player in the stack-array* \returns ICM equity for selected player*/public staticdoublegetEquity ( double []payouts,double []stacks,intplayer ){doubletotal =0 ;for( inti =0 ; i < stacks.length; i++ )total += stacks [ i ] ;returngetEquity ( payouts, stacks.clone () , total, player,0 ) ;}//Recursive method doing the actual calculation.private staticdoublegetEquity ( double []payouts,double []stacks,doubletotal,intplayer,intdepth ){doubleeq = stacks [ player ]/ total * payouts [ depth ] ;if ( depth +1< payouts.length )for( inti =0 ; i < stacks.length; i++ )if( i != player && stacks [ i ]>0.0 ) {doublec = stacks [ i ] ;stacks [ i ]=0.0 ;eq += getEquity ( payouts, stacks, total - c, player, depth +1 )* c / total;stacks [ i ]= c;}returneq;}复制代码来源: 09.gif仅适用于单桌SNG吧,看奖金分布是0.5 0.3 0.2的。这个用excel也能很快算出来 仅适用于单桌SNG吧,看奖金分布是0.5 0.3 0.2的。这个用excel也能很快算出来greatsunkai 发表于 2011-1-9 22:22不仅仅适用于单桌SNG,多桌一样好使。代码注释中出现了 0.50.30.2 是作者举的例子而已。 多桌要到差不多final table的时候ICM才显得比较重要
頁:
[1]