Tuesday 29 July 2008

Taking a step back

Last night, I finally sat down at the computer again with intent to program. I had all my minimax and alpha-beta pruning print-outs scattered around me, but I chose to postpone the development of any new strategies. I think common sense had returned instead.

As mentioned in the previous development post, I already had a strategy programmed that played the game better than me. I also had a few progressively dimmer strategies that I could pit it against. I'd already played them off against each other multiple times and it appeared that there was a second player advantage (contrary to expectations). What I really needed to do was validate this.

One thing I could do was test more board layouts. The game board for Project Beaver isn't necessarily the same for every game, so I set about randomising it (using RNGCryptoServiceProvider, if you're interested). A couple of hours later, I'd done that, changed the UI code a little to support it, wasted time making a few new icons, and then pitted strategy against strategy over and over again.

Although I didn't record the results anywhere, it did feel like any previous advantage mostly disappeared with this randomisation of the board layout. So, what next? I think I might write a little bit of code to run the tests continuously, pitting each strategy against each other for maybe 1000 games each. Oh, and I'll log the results this time. :)

Only after that might I start thinking about minimax again. For the moment, however, I'm trying to keep in mind my overall aim with this project: find out whether the game has a first player advantage. Something tells me I don't necessarily need fancy schmancy algorithms for that, even if a wider range of strategies would help confirm results.

No comments: