Draft
Conversation
Implement a new player type that uses Large Language Models via Ollama to make game decisions: - LLMPlayer class: Makes network calls to local Ollama instance for each decision - Prompt template: Markdown template with simplified game state and numbered actions - LangChain integration: Uses langchain for prompt templating and Ollama integration - Robust parsing: Best-effort extraction of action numbers from LLM responses with fallbacks - Documentation: Comprehensive README with setup instructions and troubleshooting - Example: Complete working example showing usage with different configurations Features: - Configurable model selection (llama3.2, mistral, etc.) - Simplified state representation optimized for LLM context - Safe fallback behavior if LLM returns invalid responses - Temperature control for decision-making style Dependencies: langchain, langchain-ollama (optional, only needed for LLMPlayer)
Clarify that opponent stats show only public information: - Changed "total resources" to "resource cards" for clarity - Added separate count for development cards (also public) - Added comment noting this is public information only - Opponents' specific resource breakdown remains hidden This matches actual Catan rules where you can see opponents' hand sizes but not which specific resources they hold.
Improve the LLM prompt clarity and usefulness: Hand representation: - Show resources as list: ['WOOD', 'WOOD', 'BRICK'] - Show unused dev cards as list: ['KNIGHT', 'YEAR_OF_PLENTY'] - Show used dev cards as list: ['KNIGHT'] - More intuitive than separate counts Building locations: - Add helper function to describe nodes by adjacent tiles - Each building shown with tile description: "Settlement at 3 WHEAT - 5 ORE - 6 BRICK" - Helps LLM understand board position and production potential - Uses board.map.adjacent_tiles to get tile info (number + resource) Prompt template: - Reorganize into clear sections: Hand & Cards, Buildings, Bonuses - Remove redundant individual resource counts - Add "Buildings Available to Build" section - More readable and easier for LLM to parse This gives the LLM better spatial awareness and clearer state representation for making informed strategic decisions.
✅ Deploy Preview for catanatron-staging canceled.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.