### Complete Solver Configuration Example Source: https://context7.com/bupticybee/texassolver/llms.txt A full input file demonstrating all commands for solving a flop situation. This includes game setup, player ranges, bet sizes, and solver configurations. ```plaintext # Game setup set_pot 50 set_effective_stack 200 set_board Qs,Jh,2h # Player ranges set_range_ip AA,KK,QQ,JJ,TT,99:0.75,88:0.75,77:0.5,66:0.25,55:0.25,AK,AQs,AQo:0.75,AJs,AJo:0.5,ATs:0.75,A6s:0.25,A5s:0.75,A4s:0.75,A3s:0.5,A2s:0.5,KQs,KQo:0.5,KJs,KTs:0.75,K5s:0.25,K4s:0.25,QJs:0.75,QTs:0.75,Q9s:0.5,JTs:0.75,J9s:0.75,J8s:0.75,T9s:0.75,T8s:0.75,T7s:0.75,98s:0.75,97s:0.75,96s:0.5,87s:0.75,86s:0.5,85s:0.5,76s:0.75,75s:0.5,65s:0.75,64s:0.5,54s:0.75,53s:0.5,43s:0.5 set_range_oop QQ:0.5,JJ:0.75,TT,99,88,77,66,55,44,33,22,AKo:0.25,AQs,AQo:0.75,AJs,AJo:0.75,ATs,ATo:0.75,A9s,A8s,A7s,A6s,A5s,A4s,A3s,A2s,KQ,KJ,KTs,KTo:0.5,K9s,K8s,K7s,K6s,K5s,K4s:0.5,K3s:0.5,K2s:0.5,QJ,QTs,Q9s,Q8s,Q7s,JTs,JTo:0.5,J9s,J8s,T9s,T8s,T7s,98s,97s,96s,87s,86s,76s,75s,65s,64s,54s,53s,43s # Bet sizes configuration set_bet_sizes oop,flop,bet,50 set_bet_sizes oop,flop,raise,60 set_bet_sizes oop,flop,allin set_bet_sizes ip,flop,bet,50 set_bet_sizes ip,flop,raise,60 set_bet_sizes ip,flop,allin set_bet_sizes oop,turn,bet,50 set_bet_sizes oop,turn,raise,60 set_bet_sizes oop,turn,allin set_bet_sizes ip,turn,bet,50 set_bet_sizes ip,turn,raise,60 set_bet_sizes ip,turn,allin set_bet_sizes oop,river,bet,50 set_bet_sizes oop,river,donk,50 set_bet_sizes oop,river,raise,60,100 set_bet_sizes oop,river,allin set_bet_sizes ip,river,bet,50 set_bet_sizes ip,river,raise,60,100 set_bet_sizes ip,river,allin # Solver configuration set_allin_threshold 0.67 build_tree set_thread_num 8 set_accuracy 0.5 set_max_iteration 200 set_print_interval 10 set_use_isomorphism 1 # Run solver and export results start_solve set_dump_rounds 2 dump_result output_result.json ``` -------------------------------- ### Start Solver Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Initiates the game solving process based on all previously configured parameters. This command should be run after all settings are applied. ```plaintext start_solve ``` -------------------------------- ### Load Texas Solver Library via C FFI Source: https://github.com/bupticybee/texassolver/blob/master/resources/ffi_api/README.MD Examples for loading the library on different operating systems. Use the provided Python bindings for production use instead of direct FFI calls. ```python from ctypes import * api_library = CDLL('api.dll') # python script in same directory as library api_library.api(b"resources/text/commandline_sample_input.txt", b"./resources", b"holdem") # should just work # verify that it generates a file with the solution ``` ```python api_library = CDLL('api.so') ``` ```python api_library = CDLL('api.dylib') ``` -------------------------------- ### Set Initial Pot Size Source: https://context7.com/bupticybee/texassolver/llms.txt Configures the starting pot size for the game. The specified amount is split equally between both players' commitments. ```plaintext set_pot 50 ``` -------------------------------- ### Set In-Position Player Range Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Defines the starting hand range for the player acting in position. Ranges can be specified with frequencies. ```plaintext set_range_ip QQ:0.5,JJ:0.75,TT,99,88,77,66,55,44,33,22,AKo:0.25,AQs,AQo:0.75,AJs,AJo:0.75,ATs,ATo:0.75,A9s,A8s,A7s,A6s,A5s,A4s,A3s,A2s,KQ,KJ,KTs,KTo:0.5,K9s,K8s,K7s,K6s,K5s,K4s:0.5,K3s:0.5,K2s:0.5,QJ,QTs,Q9s,Q8s,Q7s,JTs,JTo:0.5,J9s,J8s,T9s,T8s,T7s,98s,97s,96s,87s,86s,76s,75s,65s,64s,54s,53s,43s ``` -------------------------------- ### Set Out-of-Position Player Range Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Defines the starting hand range for the player acting out of position. Ranges can be specified with frequencies. ```plaintext set_range_oop AA,KK,QQ,JJ,TT,99:0.75,88:0.75,77:0.5,66:0.25,55:0.25,AK,AQs,AQo:0.75,AJs,AJo:0.5,ATs:0.75,A6s:0.25,A5s:0.75,A4s:0.75,A3s:0.5,A2s:0.5,KQs,KQo:0.5,KJs,KTs:0.75,K5s:0.25,K4s:0.25,QJs:0.75,QTs:0.75,Q9s:0.5,JTs:0.75,J9s:0.75,J8s:0.75,T9s:0.75,T8s:0.75,T7s:0.75,98s:0.75,97s:0.75,96s:0.5,87s:0.75,86s:0.5,85s:0.5,76s:0.75,75s:0.5,65s:0.75,64s:0.5,54s:0.75,53s:0.5,43s:0.5 ``` -------------------------------- ### Build and Load GameTree Source: https://context7.com/bupticybee/texassolver/llms.txt Demonstrates creating a GameTree by either building it programmatically with specific game settings or loading it from a JSON file. Includes methods for accessing the root node and estimating memory usage. ```cpp #include "include/GameTree.h" // Create deck for Texas Hold'em vector ranks = {"2","3","4","5","6","7","8","9","T","J","Q","K","A"}; vector suits = {"c","d","h","s"}; Deck deck(ranks, suits); // Build game tree with settings GameTree tree( deck, 25.0f, // oop_commit 25.0f, // ip_commit 1, // current_round (flop) 4, // raise_limit 0.5f, // small_blind 1.0f, // big_blind 225.0f, // stack buildingSettings, 0.67f // allin_threshold ); // Or load from JSON file GameTree tree("gametree.json", deck); // Get root node shared_ptr root = tree.getRoot(); // Print tree for debugging (up to depth 4) GameTree::recurrentPrintTree(root, 0, 4); // Estimate memory usage int deck_remaining = 52 - 3; // Cards left after flop int p1_range_size = 150; int p2_range_size = 200; long long memory_bytes = tree.estimate_tree_memory(deck_remaining, p1_range_size, p2_range_size); ``` -------------------------------- ### Solver Input Configuration File Source: https://github.com/bupticybee/texassolver/blob/master/resources/ffi_api/README.MD A sample configuration file defining game parameters, bet sizes, and solver settings for the tree building and solving process. ```text set_pot 50 set_effective_stack 200 set_board Qs,Jh,2h set_range_ip AA,KK,QQ,JJ,TT,99:0.75,88:0.75,77:0.5,66:0.25,55:0.25,AK,AQs,AQo:0.75,AJs,AJo:0.5,ATs:0.75,A6s:0.25,A5s:0.75,A4s:0.75,A3s:0.5,A2s:0.5,KQs,KQo:0.5,KJs,KTs:0.75,K5s:0.25,K4s:0.25,QJs:0.75,QTs:0.75,Q9s:0.5,JTs:0.75,J9s:0.75,J8s:0.75,T9s:0.75,T8s:0.75,T7s:0.75,98s:0.75,97s:0.75,96s:0.5,87s:0.75,86s:0.5,85s:0.5,76s:0.75,75s:0.5,65s:0.75,64s:0.5,54s:0.75,53s:0.5,43s:0.5 set_range_oop QQ:0.5,JJ:0.75,TT,99,88,77,66,55,44,33,22,AKo:0.25,AQs,AQo:0.75,AJs,AJo:0.75,ATs,ATo:0.75,A9s,A8s,A7s,A6s,A5s,A4s,A3s,A2s,KQ,KJ,KTs,KTo:0.5,K9s,K8s,K7s,K6s,K5s,K4s:0.5,K3s:0.5,K2s:0.5,QJ,QTs,Q9s,Q8s,Q7s,JTs,JTo:0.5,J9s,J8s,T9s,T8s,T7s,98s,97s,96s,87s,86s,76s,75s,65s,64s,54s,53s,43s set_bet_sizes oop,flop,bet,50 set_bet_sizes oop,flop,raise,60 set_bet_sizes oop,flop,allin set_bet_sizes ip,flop,bet,50 set_bet_sizes ip,flop,raise,60 set_bet_sizes ip,flop,allin set_bet_sizes oop,turn,bet,50 set_bet_sizes oop,turn,raise,60 set_bet_sizes oop,turn,allin set_bet_sizes ip,turn,bet,50 set_bet_sizes ip,turn,raise,60 set_bet_sizes ip,turn,allin set_bet_sizes oop,river,bet,50 set_bet_sizes oop,river,donk,50 set_bet_sizes oop,river,raise,60,100 set_bet_sizes oop,river,allin set_bet_sizes ip,river,bet,50 set_bet_sizes ip,river,raise,60,100 set_bet_sizes ip,river,allin set_allin_threshold 0.67 build_tree set_thread_num 8 set_accuracy 0.5 set_max_iteration 200 set_print_interval 10 set_use_isomorphism 1 start_solve set_dump_rounds 2 dump_result output_result.json ``` -------------------------------- ### start_solve Command Source: https://context7.com/bupticybee/texassolver/llms.txt Initiates the CFR solving process. ```APIDOC ## start_solve ### Description Starts the CFR solving process using the previously configured parameters. ``` -------------------------------- ### Configure Betting Options with StreetSetting Source: https://context7.com/bupticybee/texassolver/llms.txt Demonstrates how to configure betting options for a specific street (flop, turn, river) and player position using the StreetSetting class. Allows defining bet sizes, raise sizes, donk bet sizes, and whether all-in bets are permitted. ```cpp #include "include/tools/StreetSetting.h" // Create street setting with bet sizes as pot percentages vector bet_sizes = {33, 50, 75, 100}; // 33%, 50%, 75%, 100% pot vector raise_sizes = {50, 100}; // Raise sizes vector donk_sizes = {50}; // Donk bet sizes (OOP only) bool allow_allin = true; StreetSetting river_oop(bet_sizes, raise_sizes, donk_sizes, allow_allin); // Access settings vector& bets = river_oop.bet_sizes; vector& raises = river_oop.raise_sizes; bool can_allin = river_oop.allin; ``` -------------------------------- ### Initialize PokerSolver C++ Class Source: https://context7.com/bupticybee/texassolver/llms.txt Initialize the main solver class in C++ with game parameters like ranks, suits, and compairer file paths. This sets up the solver for Texas Hold'em. ```cpp #include "include/runtime/PokerSolver.h" // Initialize solver for Texas Hold'em string ranks = "2,3,4,5,6,7,8,9,T,J,Q,K,A"; string suits = "c,d,h,s"; string compairer_file = "./resources/compairer/card5_dic_sorted.txt"; string compairer_file_bin = "./resources/compairer/card5_dic_zipped.bin"; int lines = 2598961; PokerSolver ps(ranks, suits, compairer_file, lines, compairer_file_bin); ``` -------------------------------- ### Run Solver with Input File Source: https://context7.com/bupticybee/texassolver/llms.txt Executes the Texas Solver using commands from a specified input file. Requires specifying the resource directory and game mode. ```bash ./TexasSolver -i input_commands.txt -r ./resources -m holdem ``` -------------------------------- ### Aggregate Street Settings with GameTreeBuildingSettings Source: https://context7.com/bupticybee/texassolver/llms.txt Shows how to aggregate StreetSetting configurations for all streets and player positions into a single GameTreeBuildingSettings object. Provides methods to access specific street settings by player position and street name. ```cpp #include "include/tools/GameTreeBuildingSettings.h" // Create settings for each street and position StreetSetting flop_ip({50}, {60}, {}, true); StreetSetting turn_ip({50}, {60}, {}, true); StreetSetting river_ip({50}, {60, 100}, {}, true); StreetSetting flop_oop({50}, {60}, {}, true); StreetSetting turn_oop({50}, {60}, {}, true); StreetSetting river_oop({50}, {60, 100}, {50}, true); // Create combined settings GameTreeBuildingSettings settings( flop_ip, turn_ip, river_ip, flop_oop, turn_oop, river_oop ); // Access specific setting StreetSetting& oop_river = settings.get_setting("oop", "river"); StreetSetting& ip_flop = settings.get_setting("ip", "flop"); ``` -------------------------------- ### set_pot Command Source: https://context7.com/bupticybee/texassolver/llms.txt Sets the initial pot size for the game. ```APIDOC ## set_pot ### Description Sets the initial pot size by splitting it equally between both players' commitments. ### Parameters - **pot_size** (number) - Required - The total pot size. ``` -------------------------------- ### Card Representation and Conversion Source: https://context7.com/bupticybee/texassolver/llms.txt Shows how to create Card objects from strings, convert them to integer representations, and vice versa. Also includes utilities for converting board cards to a 64-bit format for efficient comparison and parsing rank/suit characters. ```cpp #include "include/Card.h" // Create card from string Card card("As"); // Ace of spades // Get card as integer (0-51) int card_int = card.getCardInt(); // Convert string to integer int ace_spades = Card::strCard2int("As"); // Returns integer representation // Convert integer back to string string card_str = Card::intCard2Str(ace_spades); // Returns "As" // Convert board cards to 64-bit representation for fast comparison vector board_cards = {"Qs", "Jh", "2h"}; uint64_t board_long = Card::boardCards2long(board_cards); // Check if two boards share any cards uint64_t hand_long = Card::boardCards2long({"As", "Kh"}); bool has_conflict = Card::boardsHasIntercept(board_long, hand_long); // Convert rank/suit characters int rank = Card::rankToInt('A'); // Returns rank value for Ace int suit = Card::suitToInt('s'); // Returns suit value for spades string rank_str = Card::rankToString(12); // Returns "A" string suit_str = Card::suitToString(3); // Returns "s" ``` -------------------------------- ### Initialize and Run PCfrSolver in C++ Source: https://context7.com/bupticybee/texassolver/llms.txt Configures and executes the parallel CFR solver, including methods for exporting strategies and retrieving node-specific EV data. ```cpp #include "include/solver/PCfrSolver.h" // Create solver with configured parameters PCfrSolver solver( game_tree, // shared_ptr range1, // vector IP range range2, // vector OOP range initial_board, // vector board card integers compairer, // shared_ptr hand evaluator deck, // Deck 200, // iteration_number false, // debug mode 10, // print_interval "log.txt", // logfile "discounted_cfr", // trainer algorithm Solver::MonteCarolAlg::NONE, // Monte Carlo method -1, // warmup iterations (-1 = disabled) 0.5f, // target accuracy true, // use_isomorphism 0, // use_halffloats (0=off, 1=on) 8 // num_threads ); // Run training solver.train(); // Stop solver (for GUI interrupt) solver.stop(); // Export strategy to JSON json strategy_json = solver.dumps(false, 2); // with_status, depth // Get strategy for specific node shared_ptr node = /* get from tree */; vector chance_cards = {/* dealt cards */}; vector>> strategy = solver.get_strategy(node, chance_cards); vector>> evs = solver.get_evs(node, chance_cards); ``` -------------------------------- ### Configure Game Tree Building Settings in C++ Source: https://context7.com/bupticybee/texassolver/llms.txt Configure game tree building settings for different streets (flop, turn, river) and player positions (IP, OOP). This defines bet, raise, and donk sizes. ```cpp // Configure game tree building settings StreetSetting flop_ip({50}, {60}, {}, true); // bet sizes, raise sizes, donk sizes, allin StreetSetting turn_ip({50}, {60}, {}, true); StreetSetting river_ip({50}, {60, 100}, {}, true); StreetSetting flop_oop({50}, {60}, {}, true); StreetSetting turn_oop({50}, {60}, {}, true); StreetSetting river_oop({50}, {60, 100}, {50}, true); GameTreeBuildingSettings gtbs(flop_ip, turn_ip, river_ip, flop_oop, turn_oop, river_oop); ``` -------------------------------- ### Run Solver for Short Deck Poker Source: https://context7.com/bupticybee/texassolver/llms.txt Configures and runs the Texas Solver specifically for Short Deck poker. Requires specifying the resource directory and game mode. ```bash ./TexasSolver -r ./resources -m shortdeck ``` -------------------------------- ### Build Game Tree Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Initiates the construction of the game tree based on the configured parameters. This is a prerequisite for solving the game. ```plaintext build_tree ``` -------------------------------- ### Build Game Tree in C++ Source: https://context7.com/bupticybee/texassolver/llms.txt Build the game tree using the configured settings. This involves specifying player commitments, current round, raise limits, blinds, stack size, and all-in threshold. ```cpp // Build game tree float oop_commit = 25; // OOP player's pot commitment float ip_commit = 25; // IP player's pot commitment int current_round = 1; // 1=flop, 2=turn, 3=river int raise_limit = 4; // Max raises per street float small_blind = 0.5; float big_blind = 1; float stack = 225; // Total stack float allin_threshold = 0.67; ps.build_game_tree(oop_commit, ip_commit, current_round, raise_limit, small_blind, big_blind, stack, gtbs, allin_threshold); ``` -------------------------------- ### Call Solver from Python using ctypes Source: https://context7.com/bupticybee/texassolver/llms.txt Load the shared library and configure function signatures to call the solver from Python. Ensure the library name matches your platform (e.g., api.dll, api.so, api.dylib). ```python import ctypes import os # Load the shared library based on platform # Windows: api.dll, Linux: api.so, macOS: api.dylib libname = os.path.abspath(os.path.join(os.getcwd(), "api.dll")) c_lib = ctypes.CDLL(libname) # Configure function signature c_lib.api.restype = ctypes.c_int c_lib.api.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p] # Execute solver with input file input_file = b"resources/text/commandline_sample_input.txt" resource_dir = b"./resources" mode = b"holdem" # or b"shortdeck" result = c_lib.api(input_file, resource_dir, mode) # result is 0 on success ``` -------------------------------- ### Train Solver in C++ Source: https://context7.com/bupticybee/texassolver/llms.txt Train the solver using specified player ranges, board, and training parameters. This includes iterations, accuracy, algorithm choice, and thread count. ```cpp // Train solver string ip_range = "AA,KK,QQ,JJ,TT,AK,AQs"; string oop_range = "QQ,JJ,TT,99,88,77,AKo,AQs,KQs"; string board = "Qs,Jh,2h"; string log_file = "solver_log.txt"; int iterations = 200; int print_interval = 10; string algorithm = "discounted_cfr"; int warmup = -1; float accuracy = 0.5; bool use_isomorphism = true; int use_halffloats = 0; int threads = 8; ps.train(ip_range, oop_range, board, log_file, iterations, print_interval, algorithm, warmup, accuracy, use_isomorphism, use_halffloats, threads); ``` -------------------------------- ### Build and Visualize Game Trees in Python Source: https://context7.com/bupticybee/texassolver/llms.txt Defines game rules and constructs full or partial game trees, with support for JSON export and graph visualization. ```python from TreeBuilder import RulesBuilder, FiveCardTexasTreeBuilder, PartGameTreeBuilder # Define game rules rule = { 'players': 2, 'rounds': 4, # preflop, flop, turn, river 'legal_actions_after': { 'begin': ['check', 'bet', 'fold'], 'roundbegin': ['check', 'bet', 'fold'], 'check': ['check', 'bet', 'fold'], 'bet': ['call', 'raise', 'fold'], 'raise': ['call', 'raise', 'fold'], 'call': ['check', 'raise'], 'fold': None } } # Create rules builder rules = RulesBuilder( rule=rule, current_commit=[2, 2], # Current pot commitments current_round=2, # Start at flop raise_limit=4, # Max raises per street check_limit=2, # Max checks before next street small_blind=0.5, big_blind=1, stack=10, bet_sizes=["1_pot", "0.5_pot"], # Pot percentages raise_sizes=["1_pot", "all-in"], allin_threshold=0.67 ) # Build complete game tree tree_builder = FiveCardTexasTreeBuilder(rules) # Or build partial tree from specific position partial_rule = RulesBuilder( rule=rule, current_commit=[25, 25], current_round=2, raise_limit=3, stack=200, bet_sizes=["0.5_pot", "1_pot"], raise_sizes=["0.5_pot", "1_pot", "all-in"], allin_threshold=0.67 ) partial_rule.current_player = 0 partial_tree = PartGameTreeBuilder(partial_rule) # Export tree to JSON for visualization tree_builder.gen_km_json("game_tree.json", limit=10) # Plot tree using networkx (requires graphviz) tree_builder.plot_tree(jupyter=True, depth_limit=5, show=True) # Get formatted tree as list of edges edges = tree_builder.format_tree(depth_limit=10) for parent, child in edges: print(f"{parent} -> {child}") ``` -------------------------------- ### Configure Bet Sizes Source: https://context7.com/bupticybee/texassolver/llms.txt Sets bet and raise sizes as percentages of the pot for specific players and streets. Supports 'bet', 'raise', 'donk', and 'allin' types. ```plaintext # Format: set_bet_sizes ,,, # OOP flop bet sizes (50% pot) set_bet_sizes oop,flop,bet,50 # OOP flop raise sizes (60% pot) set_bet_sizes oop,flop,raise,60 # Enable all-in option for OOP on flop set_bet_sizes oop,flop,allin # IP flop settings set_bet_sizes ip,flop,bet,50 set_bet_sizes ip,flop,raise,60 set_bet_sizes ip,flop,allin # Turn settings set_bet_sizes oop,turn,bet,50 set_bet_sizes oop,turn,raise,60 set_bet_sizes oop,turn,allin set_bet_sizes ip,turn,bet,50 set_bet_sizes ip,turn,raise,60 set_bet_sizes ip,turn,allin # River settings with multiple raise sizes set_bet_sizes oop,river,bet,50 set_bet_sizes oop,river,donk,50 set_bet_sizes oop,river,raise,60,100 set_bet_sizes oop,river,allin set_bet_sizes ip,river,bet,50 set_bet_sizes ip,river,raise,60,100 set_bet_sizes ip,river,allin ``` -------------------------------- ### Run Solver in Interactive Mode Source: https://context7.com/bupticybee/texassolver/llms.txt Launches the Texas Solver in interactive mode, allowing commands to be entered directly. Requires specifying the resource directory and game mode. ```bash ./TexasSolver -r ./resources -m holdem ``` -------------------------------- ### PrivateCards Class for Player Hands Source: https://context7.com/bupticybee/texassolver/llms.txt Illustrates the creation and usage of the PrivateCards class, which represents a player's hole cards. It includes methods for converting to a 64-bit board representation, generating a hash code, and retrieving string or individual card representations. ```cpp #include "include/ranges/PrivateCards.h" // Create private cards with weight int card1 = Card::strCard2int("As"); int card2 = Card::strCard2int("Kh"); float weight = 1.0f; // Full weight in range PrivateCards hand(card1, card2, weight); // Get 64-bit board representation uint64_t hand_long = hand.toBoardLong(); // Get hash code for deduplication int hash = hand.hashCode(); // Get string representation string str = hand.toString(); // "AsKh" // Access individual cards const vector& cards = hand.get_hands(); // Returns {card1, card2} ``` -------------------------------- ### set_bet_sizes Command Source: https://context7.com/bupticybee/texassolver/llms.txt Configures bet sizes for specific players, streets, and bet types. ```APIDOC ## set_bet_sizes ### Description Configures bet sizes for each player, street, and bet type. Sizes are percentages of the pot. ### Parameters - **player** (string) - Required - 'ip' or 'oop'. - **street** (string) - Required - 'flop', 'turn', or 'river'. - **bet_type** (string) - Required - 'bet', 'raise', 'donk', or 'allin'. - **sizes** (list) - Optional - Percentages of the pot. ``` -------------------------------- ### set_board Command Source: https://context7.com/bupticybee/texassolver/llms.txt Configures the community board cards to determine the current street. ```APIDOC ## set_board ### Description Configures the community board cards. The number of cards determines the starting street (3 cards = flop, 4 = turn, 5 = river). ### Parameters - **cards** (string) - Required - Comma-separated list of card identifiers (e.g., Qs,Jh,2h). ``` -------------------------------- ### Dump Result to File Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Saves the results of the solver computation to a specified JSON file. This allows for post-analysis of the game strategy. ```plaintext dump_result output_result.json ``` -------------------------------- ### Export Strategy to JSON in C++ Source: https://context7.com/bupticybee/texassolver/llms.txt Export the computed strategy to a JSON file using the `dump_strategy` method. The second argument specifies the number of rounds to dump. ```cpp // Export strategy to JSON ps.dump_strategy(QString("output_strategy.json"), 2); ``` -------------------------------- ### Set Game Pot Size Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the initial pot size for the game. This value is crucial for calculating pot odds and bet sizing. ```plaintext set_pot 10 ``` -------------------------------- ### Set Print Interval Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures how often the solver should print progress updates during the computation. This helps in monitoring the solving process. ```plaintext set_print_interval 10 ``` -------------------------------- ### Set Bet Sizes for In-Position Flop Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the bet sizes available to the in-position player on the flop. This includes standard bets, raises, and all-ins. ```plaintext set_bet_sizes ip,flop,bet,100 ``` ```plaintext set_bet_sizes ip,flop,raise,50 ``` ```plaintext set_bet_sizes ip,flop,allin ``` -------------------------------- ### Set Number of Threads Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the number of CPU threads to be used for the solving process. More threads can potentially speed up computation. ```plaintext set_thread_num 6 ``` -------------------------------- ### Set Bet Sizes for Out-of-Position Flop Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the bet sizes available to the out-of-position player on the flop. This includes standard bets, raises, and all-ins. ```plaintext set_bet_sizes oop,flop,bet,100 ``` ```plaintext set_bet_sizes oop,flop,raise,50 ``` ```plaintext set_bet_sizes oop,flop,allin ``` -------------------------------- ### Set Use Isomorphism Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Enables or disables the use of isomorphism for optimizing the game tree. Using isomorphism can significantly reduce computation time for certain game structures. ```plaintext set_use_isomorphism 1 ``` -------------------------------- ### Set Bet Sizes for In-Position Turn Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the bet sizes available to the in-position player on the turn. This includes standard bets and raises. ```plaintext set_bet_sizes ip,turn,bet,100 ``` ```plaintext set_bet_sizes ip,turn,raise,50 ``` -------------------------------- ### Set Solver Accuracy Source: https://context7.com/bupticybee/texassolver/llms.txt Sets the target exploitability accuracy for the solver's convergence, measured as a percentage of the pot. Lower values indicate higher accuracy. ```plaintext set_accuracy 0.5 ``` -------------------------------- ### Set Maximum Iterations Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Specifies the maximum number of iterations the solver will perform. This acts as a safeguard against excessively long computation times. ```plaintext set_max_iteration 200 ``` -------------------------------- ### Set Dump Rounds Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the number of rounds to be dumped in the output file. This is useful for analyzing specific stages of the game. ```plaintext set_dump_rounds 1 ``` -------------------------------- ### Set Bet Sizes for In-Position River Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the bet sizes available to the in-position player on the river. This includes standard bets and raises. ```plaintext set_bet_sizes ip,river,bet,100 ``` ```plaintext set_bet_sizes ip,river,raise,50 ``` ```plaintext set_bet_sizes ip,river,allin ``` -------------------------------- ### Set JSON Dump Rounds Source: https://context7.com/bupticybee/texassolver/llms.txt Specifies the number of game tree rounds to include when exporting the solver results to JSON format. ```plaintext set_dump_rounds 2 ``` -------------------------------- ### Set Community Board Cards Source: https://context7.com/bupticybee/texassolver/llms.txt Configures the community cards on the board. The number of cards provided determines the current street (flop, turn, or river). ```plaintext # Flop board (3 cards) set_board Qs,Jh,2h ``` ```plaintext # Turn board (4 cards) set_board Ks,Qh,Jd,4c ``` ```plaintext # River board (5 cards) set_board As,Kh,Qd,Jc,Ts ``` -------------------------------- ### Set Bet Sizes for Out-of-Position Turn Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the bet sizes available to the out-of-position player on the turn. This includes standard bets, donk bets, raises, and all-ins. ```plaintext set_bet_sizes oop,turn,bet,100 ``` ```plaintext set_bet_sizes oop,turn,donk,100 ``` ```plaintext set_bet_sizes oop,turn,raise,50 ``` ```plaintext set_bet_sizes oop,turn,allin ``` -------------------------------- ### Set Effective Stack Size Source: https://context7.com/bupticybee/texassolver/llms.txt Defines the effective stack size for players, which is the maximum amount that can be bet during the hand. ```plaintext set_effective_stack 200 ``` -------------------------------- ### Set All-in Threshold Source: https://context7.com/bupticybee/texassolver/llms.txt Specifies the threshold, as a fraction of the pot, at which any bet will automatically be considered an all-in bet. ```plaintext set_allin_threshold 0.67 ``` -------------------------------- ### Set Effective Stack Size Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Defines the effective stack size for the players involved in the hand. This is the smaller of the two stacks when considering a specific hand. ```plaintext set_effective_stack 95 ``` -------------------------------- ### Set Bet Sizes for Out-of-Position River Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Configures the bet sizes available to the out-of-position player on the river. This includes standard bets, donk bets, raises, and all-ins. ```plaintext set_bet_sizes oop,river,bet,100 ``` ```plaintext set_bet_sizes oop,river,donk,100 ``` ```plaintext set_bet_sizes oop,river,raise,50 ``` ```plaintext set_bet_sizes oop,river,allin ``` -------------------------------- ### Set All-in Threshold Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Sets the threshold for considering an all-in bet. A value of 1.0 typically means any bet that empties the effective stack is considered an all-in. ```plaintext set_allin_threshold 1.0 ``` -------------------------------- ### Set Board Cards Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Specifies the community cards that are currently dealt on the board. This is essential for evaluating hand strengths. ```plaintext set_board Qs,Jh,2h ``` -------------------------------- ### Set Solver Accuracy Source: https://github.com/bupticybee/texassolver/blob/master/benchmark/benchmark_texassolver.txt Determines the desired accuracy level for the solver. Lower values result in faster computation but potentially less precise strategies. ```plaintext set_accuracy 0.3 ``` -------------------------------- ### Set Number of Computation Threads Source: https://context7.com/bupticybee/texassolver/llms.txt Configures the number of threads to be used for parallel CFR computation, allowing for faster solving on multi-core processors. ```plaintext set_thread_num 8 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.