Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCTS shuffle is wrong #7

Open
Meerkov opened this issue May 10, 2018 · 2 comments
Open

MCTS shuffle is wrong #7

Meerkov opened this issue May 10, 2018 · 2 comments

Comments

@Meerkov
Copy link

Meerkov commented May 10, 2018

state.players[k].shuffle_deck()

# the mcts rollouts don't randomize cards that have been seen with Index
        indexed_cards_in_deck = []
        # print("mcts print: %s" % (state.players))

        if len(state.players[k].deck) > 0:
            while len(state.players[k].deck) > 0 and state.players[k].deck[-1].deck_location_known:
                indexed_cards_in_deck.append(state.players[k].deck.pop())
        for indexed_card in indexed_cards_in_deck:
            state.players[k].deck.append(indexed_card)
# and "imagine" a scenario for the opponent - this assumes knowledge of opponent decklist!

state.players[k].shuffle_deck()

This currently looks at my deck, finds the cards that are indexed, puts them in "indexed_cards_in_deck". Then it takes "indexed_cards_in_deck" and puts them BACK into my deck.

Then it shuffles the deck.

This code doesn't do anything.

@Meerkov
Copy link
Author

Meerkov commented May 10, 2018

More specifically, it just hurts the AI because it will not actually know the location of the cards it should.

state.players[k].shuffle_deck() should be 4 lines up.

@hlynurd
Copy link
Owner

hlynurd commented May 10, 2018

+1, this MCTS needs to remember what it knows after casting Index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants