This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd48a73
commit 2bbb7e9
Showing
2 changed files
with
21 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
from typing import List | ||
|
||
import dill as pickle | ||
|
||
from RT_cfr import * | ||
from pluribus.games.short_deck.state import * | ||
from pluribus.games.short_deck.agent import * | ||
from RT_cfr import train | ||
from pluribus.games.short_deck.agent import TrainedAgent | ||
from pluribus.poker.card import Card | ||
|
||
|
||
if __name__ == "__main__": | ||
# public_cards = [Card("ace", "spades"), Card("queen", "spades"), Card("queen", "hearts")] | ||
public_cards = [] | ||
# public_cards = [Card("ace", "spades"), Card("queen", "spades"), | ||
# Card("queen", "hearts")] | ||
public_cards: List[Card] = [] | ||
# we load a (trained) strategy | ||
agent1 = TrainedAgent("../blueprint_algo/results_2020_05_10_21_36_47_291425") | ||
# sorta hacky, but I loaded the average strategy above, now I'm replacing with | ||
# the better strategy | ||
# offline_strategy = joblib.load('/Users/colin/Downloads/offline_strategy_285800.gz') | ||
# print(sys.getsizeof(offline_strategy)) | ||
# agent1.offline_strategy = offline_strategy | ||
# print(sys.getsizeof(agent1.offline_strategy)) | ||
action_sequence = ["raise", "call", "call", "call", "call"] | ||
agent_output = train( | ||
agent1.offline_strategy, public_cards, action_sequence, 40, 6, 6, 3, 2, 6 | ||
) # TODO: back to 50 | ||
with open("realtime-strategy-refactor-deck.pkl", "wb") as file: | ||
) | ||
with open("testing2.pkl", "wb") as file: | ||
pickle.dump(agent_output, file) | ||
import ipdb | ||
ipdb.set_trace() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters