mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-25 17:10:42 +00:00
Add DynastAI integration documentation and setup scripts
- Introduced `ATROPOS_INTEGRATION.md` for detailed instructions on using DynastAI with Atropos. - Added `INSTALL_AND_RUN.md` to guide users through installation and running the game. - Created `run_dynastai.py` for a simplified testing experience without full Atropos setup. - Implemented `setup.py` to manage dependencies and ensure compatibility. - Updated `requirements.txt` to include additional dependencies and version constraints. - Enhanced `README.md` with new sections on installation, running the game, and integration with Atropos. - Added installation verification script `verify_install.py` to check for required packages. - Updated game logic to support local card generation and improved API integration. - Enhanced web interface with new features for user interaction and game metrics display.
This commit is contained in:
parent
b9a1940d12
commit
7101aad190
20 changed files with 1810 additions and 310 deletions
|
|
@ -86,23 +86,10 @@ async def test_environment():
|
|||
|
||||
def _generate_card_internal(self, metrics, category_weights):
|
||||
"""Internal method for card generation during testing"""
|
||||
from src.game_logic import generate_mock_card
|
||||
from src.game_logic import generate_card
|
||||
|
||||
# Select a category based on weights
|
||||
categories = list(category_weights.keys())
|
||||
weights = [category_weights[cat] for cat in categories]
|
||||
total_weight = sum(weights)
|
||||
|
||||
# Normalize weights
|
||||
if total_weight > 0:
|
||||
normalized_weights = [w/total_weight for w in weights]
|
||||
else:
|
||||
normalized_weights = [1/len(categories)] * len(categories)
|
||||
|
||||
category = random.choices(categories, weights=normalized_weights, k=1)[0]
|
||||
|
||||
# Use the mock generator for testing
|
||||
return generate_mock_card(metrics, category)
|
||||
# Use the main card generator which now checks cards.json first
|
||||
return generate_card(metrics, category_weights)
|
||||
|
||||
# Add the test method to the environment class
|
||||
DynastAIEnv._generate_card_internal = _generate_card_internal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue