ursulean / schnapsen

Codebase for Intelligent Systems 2020, Vrije Universiteit Amsterdam
0 stars 51 forks source link

Fixed set of cards #3

Open hasan-sh opened 4 years ago

hasan-sh commented 4 years ago

Hey @PaulUrsulean, while testing a new bot, it's reassuring to do so visually. Which can be cumbersome in some cases. For instance, if I'm testing my bot to declare a marriage, I'd have to refresh the game until i get a set of cards that has a King and Queen(of the same suit) in it. Not to mention if I wanted the bot to have King, Queen and one more card from the same suit; this is to check if the bot is actually saving a marriage when it's not its turn! And the odds of getting that are so high!!

So, i tried in the Deck.generate, but the randomness seems to be more on the client-side!! Any ideas of how to achieve that? Or is that difficult to implement?!

ursulean commented 4 years ago

visual.py takes a --seed parameter, you can use --seed 3 for a game with an instantly available marriage, and similarly --seed 50 for trump exchange.

hasan-sh commented 4 years ago

Great thanks this works. Only in phase 1 though!

ursulean commented 4 years ago

For phase 2 state generation we generate a normal starting state and play random moves until it reaches phase 2. The random choice of moves during this process uses the same seed, so it should in theory be deterministic as well. I will mark this as a bug and look into it.