tweaks
This commit is contained in:
parent
ea2857a9cd
commit
79051b51fc
2 changed files with 13 additions and 15 deletions
|
@ -53,5 +53,5 @@ Currently, on seeds 0-9999, we have:
|
|||
| 2p | 3p | 4p | 5p |
|
||||
----------|---------|---------|---------|---------|
|
||||
cheating | 24.8600 | 24.9781 | 24.9715 | 24.9583 |
|
||||
info | 15.15 | 22.79 | 24.604 | 24.778 |
|
||||
info | 17.136 | 23.181 | 24.63 | 24.805 |
|
||||
|
||||
|
|
|
@ -435,6 +435,7 @@ impl InformationPlayerStrategy {
|
|||
}
|
||||
|
||||
fn get_play_score(&self, view: &BorrowedGameView, card: &Card) -> i32 {
|
||||
if view.board.deck_size() > 0 {
|
||||
for player in view.board.get_players() {
|
||||
if player != self.me {
|
||||
if view.has_card(&player, card) {
|
||||
|
@ -442,6 +443,7 @@ impl InformationPlayerStrategy {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
5 + (5 - (card.value as i32))
|
||||
}
|
||||
|
||||
|
@ -574,9 +576,9 @@ impl InformationPlayerStrategy {
|
|||
let player_amt = (hint_info.value - hint_type) / 3;
|
||||
|
||||
let hint_player = (self.me + 1 + player_amt) % view.board.num_players;
|
||||
let card_index = 0;
|
||||
|
||||
let hand = view.get_hand(&hint_player);
|
||||
let card_index = hand.len() -1;
|
||||
let hint_card = &hand[card_index];
|
||||
|
||||
let hinted = match hint_type {
|
||||
|
@ -601,6 +603,7 @@ impl InformationPlayerStrategy {
|
|||
if let Some(hinted) = hinted_opt {
|
||||
hinted
|
||||
} else {
|
||||
// Technically possible, but never happens
|
||||
panic!("Found nothing to hint!")
|
||||
}
|
||||
}
|
||||
|
@ -621,7 +624,8 @@ impl InformationPlayerStrategy {
|
|||
let hinter = self.last_view.board.player;
|
||||
let player_amt = (view.board.num_players + hint.player - hinter - 1) % view.board.num_players;
|
||||
|
||||
let hint_type = if result[0] {
|
||||
let card_index = result.len() - 1;
|
||||
let hint_type = if result[card_index] {
|
||||
match hint.hinted {
|
||||
Hinted::Value(_) => 0,
|
||||
Hinted::Color(_) => 1,
|
||||
|
@ -686,17 +690,11 @@ impl PlayerStrategy for InformationPlayerStrategy {
|
|||
});
|
||||
|
||||
let maybe_play = risky_playable_cards[0];
|
||||
if view.board.lives_remaining > 2 {
|
||||
if maybe_play.2 > 0.5 {
|
||||
return TurnChoice::Play(maybe_play.0);
|
||||
}
|
||||
} else {
|
||||
if maybe_play.2 > 0.7 {
|
||||
return TurnChoice::Play(maybe_play.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let discard_threshold =
|
||||
view.board.total_cards
|
||||
|
|
Loading…
Reference in a new issue