"""
constants/DMQ.py

    AI Hydra
    Author: Nadim-Daniel Ghaznavi
    Copyright: (c) 2025 Nadim-Daniel Ghaznavi
    GitHub: https://github.com/NadimGhaznavi/ai-hydra
    Website: https://aihydra.osoyalce.com
    License: GPL 3.0
"""


class DMQ:
    """MQ Constants"""

    AVG_EPOCH_LOSS: str = "avg_epoch_loss"
    AVG_LOSS_DATA: str = "avg_loss_data"
    CLIENT_ID: str = "client_id"
    CMD: str = "cmd"
    CUR_EPSILON: str = "cur_epsilon"
    CUR_HIGHSCORE: str = "cur_highscore"
    CUR_NUM_CLIENTS: str = "cur_num_clients"
    CUR_SIM_STATE: str = "cur_sim_state"
    DATA: str = "data"
    DIRECTION: str = "direction"
    DYNAMIC_TRAINING: str = "dynamic_training"
    ELEM: str = "elem"
    EPOCH: str = "epoch"
    EPSILON_MIN: str = "epsilon_min"
    EPSILON_DECAY: str = "epsilon_decay"
    EPSILON_INITIAL: str = "epsilon_initial"
    ERROR: str = "error"
    EXPLORE_TYPE: str = "explore_type"
    FOOD: str = "food"
    GAME_ID: str = "game_id"
    GAME_NUM: str = "game_num"
    GET_AVG_LOSS_DATA: str = "get_avg_loss_data"
    GET_CUR_HIGHSCORE: str = "get_cur_highscore"
    GET_GAME_SCORE_DATA: str = "get_game_score_data"
    GET_HIGHSCORE_EVENTS: str = "get_highscore_events"
    GET_SIM_STATE: str = "get_sim_state"
    HEARTBEAT: str = "heartbeat"
    HIGHSCORE_EVENT: str = "highscore_event"
    LEARNING_RATE: str = "learning_rate"
    MEM_TYPE: str = "mem_type"
    MODEL_TYPE: str = "model_type"
    MOVE_DELAY: str = "move_delay"
    MQ_CLIENT: str = "MQClient"
    NUM_FRAMES: str = "num_frames"
    OK: str = "ok"
    OLD_GAME_SCORE_DATA: str = "old_game_score_data"
    OLD_HIGHSCORE_EVENTS: str = "old_highscore_events"
    PAUSE: str = "pause"
    PAUSED: str = "paused"
    REGISTER: str = "register"
    RESUME: str = "resume"
    RESET: str = "reset"
    SENDER: str = "sender"
    SIM_ROUTER: str = "SimRouter"
    SNAKE_HEAD: str = "snake_head"
    SNAKE_BODY: str = "snake_body"
    STATUS: str = "status"
    STORED_GAMES: str = "stored_games"
    RESET_MODEL_PARAMS: str = "reset_model_params"
    RUNNING: str = "running"
    RUNTIME: str = "runtime"
    SCORE: str = "score"
    SIM_CLIENT: str = "SimClient"
    SIM_SERVER: str = "SimServer"
    START: str = "start"
    STARTED: str = "started"
    STOP: str = "stop"
    STOPPED: str = "stopped"
    TIMESTAMP: str = "timestamp"
    TRAINING_LOOPS: str = "training_loops"
    UNSET: str = "unset"
    UPDATE_SNAKE: str = "update_snake"
    UPDATE_FOOD: str = "update_food"


class DMQ_Label(ConstGroup):
    CONNECTED_TO_ROUTER: str = "connected to router at"
    MALFORMED_MESSAGE: str = "Malformed message"
    RECEIVE_ERROR: str = "Error receiving message"
    ROUTER_ERROR: str = "Router error: %s"
    SHUTDOWN_MSG: str = "SimServer shutting down..."
    STARTUP_MSG: str = "SimServer running on %s"
    UNKNOWN_COMMAND: str = "Unknown command"
    UNKNOWN_SENDER: str = "Unknown sender"
    NO_SIMSERVER_CONNECTED: str = "No SimServer connected"
