# config.py import os from pathlib import Path from typing import Dict # Đường dẫn PROJECT_ROOT = Path(__file__).parent MODELS_DIR = PROJECT_ROOT / "models" # Game configuration GAME_CONFIG = { 'num_colors': 6, 'bottle_height': 4, 'num_bottles': 8, 'max_moves': 200 } # UI configuration UI_CONFIG = { 'theme': 'soft', 'server_name': '0.0.0.0', 'server_port': 7860, 'share': False, 'debug': False } # Model configuration MODEL_CONFIG = { 'device': 'auto', # 'auto', 'cuda', 'cpu' 'precision': 'fp32', # 'fp32' hoặc 'fp16' } # Color mapping for visualization COLORS_MAP = { 0: '#ffffff', # White (empty) 1: '#FF6B6B', # Red 2: '#4ECDC4', # Teal 3: '#45B7D1', # Blue 4: '#FFA07A', # Light Salmon 5: '#98D8C8', # Mint 6: '#F7DC6F' # Yellow } # Ensure models directory exists MODELS_DIR.mkdir(exist_ok=True) # Create config dict CONFIG = { 'game': GAME_CONFIG, 'ui': UI_CONFIG, 'model': MODEL_CONFIG, 'colors': COLORS_MAP, 'models_dir': str(MODELS_DIR) }