Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The current code for board generation is as follows:

  var neutralChances = Random.Range(1, MaxNeutralChances + 1);
  square.GoodChances = Random.Range(MinGoodChances, 20 - neutralChances);
  square.BadChances = 20 - (square.GoodChances + neutralChances);
MaxNeutralChances and MinGoodChances are both set to 6 in the release build. Note that one chance is equal to one face of the die, so 5%. Also, this overload of Random.Range() has an inclusive min value but an exclusive max value.

I guess I didn't include ties in that little blurb I wrote up, but the real results of my 10k trials were around 5:1:11.5 (lose:tie:win) for the AI vs random actor.

Would love to see your AI when it's done! Please shoot me an email if you want. My email is in my profile / in the site footer.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: