id: 272f563df9f748ecbd21a1082b3de456
parent_id: 10b340e9369244899594c3d8af15d338
item_type: 1
item_id: df17fb33c80046ee8826ce5ecca785f6
item_updated_time: 1780225224257
title_diff: "[]"
body_diff: "[{\"diffs\":[[0,\"PI\\\n\\\n\"],[-1,\"## T\"],[1,\"Design for a t\"],[0,\"able \"],[-1,\"S\"],[1,\"s\"],[0,\"elec\"]],\"start1\":19,\"start2\":19,\"length1\":18,\"length2\":28},{\"diffs\":[[0,\"ion \"],[-1,\"Module\\\n\\\nA Rust \"],[0,\"modu\"]],\"start1\":48,\"start2\":48,\"length1\":23,\"length2\":8},{\"diffs\":[[0,\"ts with \"],[-1,\"the \"],[0,\"poker pl\"]],\"start1\":71,\"start2\":71,\"length1\":20,\"length2\":16},{\"diffs\":[[0,\"form\"],[-1,\"'s\"],[0,\" lobb\"],[-1,\"y.\\\n\\\nUses scraping or API calls to fetch table information.\\\n\\\n## Selection Criteria\\\n\\\nDefine criteria for table selection (e.g., player skill level, average pot size).\\\n\\\nUse AI models or rule-based logic to evaluate tables.\\\n\\\n## Integration with Bot Framework\\\n\\\nThe table selection module feeds chosen tables to the bot framework.\\\n\\\nThe bot joins the selected table an\"],[1,\"ies to find optimal tables for bot deployment.\\\n\\\n---\\\n\\\n## Overview\\\n\\\nThe table selection module sits between the poker platform and the bot framework:\\\n\\\n```\\\nPoker Platform Lobby ←→ Table Selector ←→ Bot Framework\\\n   (scraping/API)        (scoring)         (strategy bot)\\\n```\\\n\\\n---\\\n\\\n## Selection Criteria\\\n\\\n| Criterion | Source | Weight |\\\n|-----------|--------|--------|\\\n| Average pot size | Lobby stats | High — bigger pots = more profit |\\\n| Player skill level | Observe\"],[0,\"d sta\"],[-1,\"r\"],[0,\"ts \"],[-1,\"playing.\\\n\\\n### Example Workflow\\\nThe table selection module fetches available tables from the poker platform.\\\n\\\nThe module evaluates tables based on predefined criteria.\\\n\\\nThe bot joins the best available table and starts playing.\\\n\\\n## Rust Implementation\\\n\\\n`\"],[1,\"/ notes | High — weaker opponents preferred |\\\n| Table fullness | Lobby stats | Medium — avoid nearly-full tables |\\\n| Blind level | Lobby stats | Filter — must match bot config |\\\n| Game type (NL/FL/PL) | Lobby stats | Filter — must match bot strategy |\\\n| Average VPIP of seated players | Tracked statistics | Medium — high VPIP = loose players |\\\n\\\n---\\\n\\\n## Architecture\\\n\\\n```rust\\\n\"],[0,\"stru\"]],\"start1\":89,\"start2\":89,\"length1\":638,\"length2\":861},{\"diffs\":[[0,\"ector {\\\n    \"],[-1,\"poker_\"],[0,\"platform: Po\"]],\"start1\":961,\"start2\":961,\"length1\":30,\"length2\":24},{\"diffs\":[[0,\" {\\\n    platform:\"],[1,\" Box<dyn\"],[0,\" PokerPlatformAP\"]],\"start1\":966,\"start2\":966,\"length1\":32,\"length2\":40},{\"diffs\":[[0,\"mAPI\"],[1,\">\"],[0,\",\\\n}\\\n\\\n\"],[-1,\"impl TableSelector {\\\n    fn new(platform: PokerPlatformAPI) -> Self {\\\n        Self {\\\n            poker_platform: platform,\\\n        }\\\n    }\\\n\"],[1,\"trait PokerPlatformAPI {\\\n    fn fetch_tables(&self) -> Vec<Table>;\\\n    fn join_table(&self, table_id: &TableId) -> Result<()>;\\\n    fn leave_table(&self, table_id: &TableId) -> Result<()>;\\\n}\\\n\\\nstruct TableCriteria {\\\n    game_type: GameType,          // NL, FL, PL\\\n    table_size: Range<usize>,     // e.g., 6..=10\\\n    blind_range: Range<f64>,      // BB range\\\n    min_avg_pot: Option<f64>,\\\n    max_skill_level: Option<f64>,\\\n}\\\n\\\nstruct Table {\\\n    id: TableId,\\\n    name: String,\\\n    game_type: GameType,\\\n    num_seats: usize,\\\n    num_players: usize,\\\n    big_blind: f64,\\\n    average_pot: f64,\\\n    players: Vec<PlayerInfo>,\\\n}\\\n```\\\n\\\n### Table Scoring\\\n\\\n```rust\\\nimpl TableSelector {\"],[0,\"\\\n   \"]],\"start1\":1003,\"start2\":1003,\"length1\":152,\"length2\":686},{\"diffs\":[[0,\"iteria: \"],[1,\"&\"],[0,\"TableCri\"]],\"start1\":1715,\"start2\":1715,\"length1\":16,\"length2\":17},{\"diffs\":[[0,\"    \"],[-1,\"let tables = self.poker_\"],[1,\"self.\"],[0,\"plat\"]],\"start1\":1762,\"start2\":1762,\"length1\":32,\"length2\":13},{\"diffs\":[[0,\"es()\"],[-1,\";\"],[0,\"\\\n\"],[1,\"    \"],[0,\"        \"],[-1,\"tables.\"],[1,\".into_\"],[0,\"iter\"]],\"start1\":1790,\"start2\":1790,\"length1\":25,\"length2\":27},{\"diffs\":[[0,\"r(|t\"],[-1,\"able\"],[0,\"| self.\"],[-1,\"evaluate_table(table\"],[1,\"matches(t\"],[0,\", \"],[-1,\"&\"],[0,\"crit\"]],\"start1\":1838,\"start2\":1838,\"length1\":42,\"length2\":26},{\"diffs\":[[0,\"y_key(|t\"],[-1,\"able\"],[0,\"| self.s\"]],\"start1\":1889,\"start2\":1889,\"length1\":20,\"length2\":16},{\"diffs\":[[0,\"core\"],[-1,\"_table(table\"],[1,\"(t\"],[0,\", \"],[-1,\"&\"],[0,\"crit\"]],\"start1\":1905,\"start2\":1905,\"length1\":23,\"length2\":12},{\"diffs\":[[0,\"    \"],[-1,\"        .cloned()\\\n    }\\\n\\\n    fn evaluate_tabl\"],[1,\"}\\\n\\\n    fn scor\"],[0,\"e(&s\"]],\"start1\":1924,\"start2\":1924,\"length1\":53,\"length2\":22},{\"diffs\":[[0,\" -> \"],[-1,\"bool {\\\n        // Evaluate table based on criteria\"],[1,\"f64 {\\\n        let mut score = 0.0;\\\n        score += table.average_pot * 0.4;           // Favor big pots\\\n        score += self.avg_opponent_weakness(table) * 0.4;  // Favor weak opponents\\\n        score += (table.num_seats - table.num_players) as f64 * 0.2; // Favor open seats\"],[0,\"\\\n   \"]],\"start1\":1991,\"start2\":1991,\"length1\":58,\"length2\":284},{\"diffs\":[[0,\"    \"],[-1,\"tru\"],[1,\"scor\"],[0,\"e\\\n    }\\\n\"],[-1,\"\\\n    fn score_table(&self, table: &Table, criteria: &TableCriteria) -> i32 {\\\n        // Score table based on criteria\\\n        0\\\n    }\\\n}`\"],[1,\"}\\\n```\\\n\\\n---\\\n\\\n## Platform Adapters\\\n\\\nEach poker platform gets its own adapter implementing `PokerPlatformAPI`:\\\n\\\n- **Scraping adapter** — reads screen/DOM elements from browser poker client\\\n- **Protocol adapter** — intercepts and parses network protocol messages\\\n- **API adapter** — uses official platform API if available\\\n\\\nThe extension (see \\\"Browser Extension\\\" note) provides the scraping/protocol layer. The table selector consumes it.\\\n\\\n---\\\n\\\n## Integration with Bot Framework\\\n\\\n1. Table selector identifies optimal table via `select_table()`\\\n2. Platform adapter joins the table\\\n3. Bot framework receives `GameInfo` events from the table\\\n4. Strategy bot produces actions\\\n5. Platform adapter executes actions on the table\\\n\\\n---\\\n\\\n## Future Enhancements\\\n\\\n- **Multi-table coordination** — manage multiple tables simultaneously\\\n- **Dynamic table switching** — leave tables when conditions deteriorate\\\n- **Bankroll-aware selection** — avoid tables above sustainable stake level\\\n- **Time-based patterns** — track when fish tend to play (evenings, weekends)\"]],\"start1\":2276,\"start2\":2276,\"length1\":151,\"length2\":1061}]"
metadata_diff: {"new":{},"deleted":["user_updated_time"]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2026-05-31T11:06:29.210Z
created_time: 2026-05-31T11:06:29.210Z
type_: 13