0

I successfully implemented a negascout game engine, which works well, but deterministically. That means I can replay the same game over and over again, because for a given position, the game engine yields the same best move every time. This is unwanted in my case, because I want to compete with my algorithm in coding tournaments and with the deterministic behavior, an opponent can easily write program that wins by just replaying a sequence of winning moves against my program.

My question is, what is the most efficient and elegant way to make it less deterministic? I could add a random offset to my position evaluation, but I'm afraid this could worsen the evaluation quality. Is there a standard way to do this?

Peter B.
  • 371
  • 2
  • 16

1 Answers1

1

Just start from another random open position. Dont add randomness to your engine until you've worked out the bugs. If two or more moves are equal, you can randomise those in the move ordering.

  • Thanks for the suggestion, but in most games I cannot change the opening position. My problem is that in some competitions you submit your compiled code. I'm less afraid that somebody will disassemble my code, but they could tune their engine to play a sequence of moves where my algorithm fails. So far I have not found any better way than randomizing to avoid this. I also tried randomly picking equally good moves, but this complicated the engine and in most cases had not much effect, because in many branches you anyway have an alpha-beta-cutoff based on the move score. – Peter B. Dec 31 '17 at 00:10