//
// Core types for abstract MCTS implementation
//

#ifndef EAGLE0_MCTS_TYPES_HPP
#define EAGLE0_MCTS_TYPES_HPP

namespace shardok {
namespace mcts {

// Abstract player identifier type
using MCTSPlayerId = int;

// Simulation policy for MCTS rollouts
enum class MCTSSimulationPolicy {
    RANDOM,                  // Pure random selection
    FILTERED_RANDOM,         // Random from filtered actions
    BEST_IMMEDIATE,          // Choose best immediate score
    WEIGHTED_BEST_IMMEDIATE  // Random weighted by score ranking
};

// Configuration for MCTS algorithm
struct MCTSConfig {
    double explorationConstant = 1.414;  // UCB1 constant (sqrt(2) by default)
    int maxSimulationDepth = 1000;       // Maximum depth for rollout
    int maxTreeDepth = 2000;             // Maximum tree depth to prevent stack overflow
    bool useMultithreading = true;       // Enable parallel MCTS
    int numThreads = 16;                 // Number of threads for parallel MCTS
    MCTSSimulationPolicy simulationPolicy = MCTSSimulationPolicy::BEST_IMMEDIATE;
};

}  // namespace mcts
}  // namespace shardok

#endif  // EAGLE0_MCTS_TYPES_HPP