mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
* Add dummy game ai subsystem * First working prototype of a machine learning model that can override player input * Update README.md * Update README.md * Fix loading path on Windows * Change ai override to player 2 * Added quick menu show game ai option * Implemented Quick Menu entry for Game AI options * Redirect debug logs to retroarch log system + properly support player override * Added support to use framebuffer as input to the AI * Added pixel format parameter to API * Fix game name * code clean-up of game_ai.cpp * Update README.md - Windows Build * Update README.md * Update README.md * Update README.md * Update config.params.sh turn off GAME_AI feature by default * Fix compile error in menu_displaylist.c * Add missing #define in menu_cbs_title.c * Added new game_ai entry in griffin_cpp * Remove GAME_AI entry in msg_hash_us.c * Fix compile error in menu_displaylist.h * Removed GAME AI references from README.md * Fixes coding style + add GameAI lib API header * Convert comment to legacy + remove unused code * Additional coding style fixes to game_ai.cpp * Fix identation issues in game_ai.cpp * Removed some debug code in game_ai.cpp * Add game_ai_lib in deps * Replace assert with retro_assert * Update Makefile.common * Converting game_ai from cpp to c. First step. * Convert game_ai from CPP to C. STEP 2: add C function calls * Convert game_ai from CPP to C. Final Step * Added shutdown function for game ai lib * Update game_ai_lib README * Fix crash when loading/unloading multiple games
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "GameAI.h"
|
|
#include "RetroModel.h"
|
|
|
|
#include <bitset>
|
|
#include <string>
|
|
#include <filesystem>
|
|
#include <vector>
|
|
#include <queue>
|
|
#include "utils/data.h"
|
|
#include "./utils/json.hpp"
|
|
|
|
|
|
|
|
class GameAILocal : public GameAI {
|
|
public:
|
|
GameAILocal():showDebug(false),
|
|
debugLogFunc(nullptr){};
|
|
|
|
|
|
RetroModel * LoadModel(const char * path);
|
|
void SetShowDebug(const bool show){ this->showDebug = show; };
|
|
void SetDebugLog(debug_log_t func){debugLogFunc = func;};
|
|
void DebugPrint(const char * msg);
|
|
|
|
protected:
|
|
void InitRAM(void * ram_ptr, int ram_size);
|
|
void LoadConfig();
|
|
void LoadConfig_Player(const nlohmann::detail::iter_impl<const nlohmann::json> &player);
|
|
|
|
|
|
bool showDebug;
|
|
debug_log_t debugLogFunc;
|
|
Retro::GameData retro_data;
|
|
|
|
std::map<std::string, RetroModel*> models;
|
|
|
|
public:
|
|
std::string full_path;
|
|
std::string dir_path;
|
|
std::string game_name;
|
|
};
|
|
|
|
|