Re: gtali computer play enhancements



On 1/28/07, Alan Horkan <horkana maths tcd ie > wrote:
> > 2. Create a preference to allow users to decide between the older or newer

presumably some users will prefer to play against the faster stupider
computer opponent, especially beginners.

That's another potential advantage to the new algorithm. It determines what to roll by randomly trying to roll each possible combination of dice N times and using the highest resultant average score. By changing N to a higher number, you should see better play, but more CPU use, but by changing it to a lower number, the computer will play worse, and more quickly. At some point, the law of large numbers implies that raising N further will have no appreciable effect on computer play.

I've done some preliminary testing with different values for N, and it seems likely that we could set levels of play - hard, medium, easy, or perhaps even expose N directly to the user. For N=10, the new algorithm appears worse than the original, whereas for N=100, it is markedly better. N=500 plays better still, but takes longer.

Geoff
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]