✅ All 10 engines now build successfully: - Designer, Economy, Event, Factory, Intelligence - Logistic, MacroEntity, Map, Operation, War 🚀 Features implemented: - FAST_BUILD vs FULL_BUILD presets for efficient development - Comprehensive defensive programming (sanitizers, contracts) - 16 C++ libraries integrated via FetchContent - GCC-compatible configuration with stack protection - Unified CMake system across all engines 🛠️ Build commands: - Fast: cmake -DFAST_BUILD=ON .. && make claude-workflow-fast - Full: cmake .. && make (all sanitizers + validation) - Single engine: make economy-engine 🔧 Development workflow optimized for daily iteration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.4 KiB
C++
53 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <thread>
|
|
#include <string>
|
|
|
|
namespace Warfactory {
|
|
namespace Operation {
|
|
|
|
class AIGeneral;
|
|
class StrategicPlanner;
|
|
class DoctrineSystem;
|
|
|
|
/**
|
|
* Autonomous Operation Engine
|
|
* Handles military strategy and adaptive AI generals
|
|
*/
|
|
class OperationEngine {
|
|
public:
|
|
OperationEngine();
|
|
~OperationEngine();
|
|
|
|
bool initialize();
|
|
void run();
|
|
void shutdown();
|
|
|
|
// Strategic planning and AI generals with ML
|
|
void createOperation(const std::string& operationId, const std::string& type);
|
|
void assignGeneral(const std::string& operationId, std::unique_ptr<AIGeneral> general);
|
|
void adaptBehaviorFromResults(const std::string& generalId, bool success);
|
|
|
|
// Doctrine evolution (learning from successes/failures)
|
|
void updateDoctrine(const std::string& companyId, const std::string& lessons);
|
|
void analyzeBattleReports(const std::vector<std::string>& reports);
|
|
|
|
private:
|
|
void engineLoop();
|
|
void processStrategicDecisions();
|
|
void adaptAIBehavior(); // ML-based adaptation
|
|
|
|
std::vector<std::unique_ptr<AIGeneral>> generals_;
|
|
std::unique_ptr<StrategicPlanner> planner_;
|
|
std::unique_ptr<DoctrineSystem> doctrines_;
|
|
std::thread engineThread_;
|
|
bool running_;
|
|
|
|
void sendOrders();
|
|
void receiveBattleReports();
|
|
};
|
|
|
|
} // namespace Operation
|
|
} // namespace Warfactory
|