//
// Fast heuristic weighting for MCTS simulations
// Provides O(1) weights based on command type and context
//

#ifndef EAGLE0_AI_HEURISTIC_WEIGHTING_HPP
#define EAGLE0_AI_HEURISTIC_WEIGHTING_HPP

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-redundant-constexpr-static-def"
#include "src/main/protobuf/net/eagle0/shardok/common/command_type.pb.h"
#pragma clang diagnostic pop

#include "src/main/cpp/net/eagle0/shardok/library/GameStateW.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/action_point_distances/ActionPointDistancesCache.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/CoordsSet.hpp"

namespace shardok {

// Fast heuristic-based command weighting for MCTS simulation policy
// Avoids expensive score calculation while maintaining intelligent bias
class AIHeuristicWeighting {
public:
    // Get weight for a command using fast heuristics with game context
    // Returns weight >= 0.0, where 0.0 means "never select" and higher is more likely
    static double GetCommandWeight(
            net::eagle0::shardok::common::CommandType commandType,
            UnitId actorUnitId,
            PlayerId actorPlayerId,
            const Coords& targetCoords,
            const GameStateW& state,
            const CoordsSet& castleCoords,
            const APDCache* apdCache,
            bool isDefender,
            std::function<BattalionTypeSPtr(BattalionTypeId)> getBattalionType);
};

}  // namespace shardok

#endif  // EAGLE0_AI_HEURISTIC_WEIGHTING_HPP
