🏗️ Created professional C++ architecture: - Factory Engine: Factorio-like production simulation - Economy Engine: Global markets and pricing algorithms - War Engine: Multi-chunk combat and auto-battler - Designer Engine: Vehicle conception (1-2 designs/tick globally) - MacroEntity Engine: Companies, diplomacy, administration points - Map Engine: Procedural generation (218 elements, FOW chunk-based) - Intelligence Engine: Metrics collection (3.1GB adaptive scaling) - Operation Engine: Strategic AI generals with ML adaptation - Logistic Engine: Supply chains and convoy management - Event Engine: Breakthrough system and global events ✅ Each engine includes: - Professional header files with complete interfaces - Autonomous threading and lifecycle management - Inter-engine communication patterns - Performance monitoring capabilities - Organized namespaces (Warfactory::Engine) 🔧 Added .gitignore for C++ development 📦 Added shared/ module for common types 🚀 Ready for CMake setup and implementation
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <thread>
|
|
|
|
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
|