Project structure of: BAAI-Agents/Cradle
Cradle
AI Tools & Models for Game Control
cache
conf
OpenAI and Azure configuration files directory.
cradle
OpenCV template matching, JSON, image utility library with decorator
agent
Intelligent agent with decision-making, memory and task management from cradle.agent module
__init__.py
Agent class importable from cradle.agent module
agent.py
Intelligent agent with decision-making, memory, and task management.
config
Config initialization for app settings and parameters.
__init__.py
Initializes Config class and sets all to include only "Config".
config.py
Config class for app settings and parameters initialization.
constants.py
Cradle constants for data handling and processing.
gameio
Game IO management and related tasks.
__init__.py
GameIO: IO, GameManager import & include.
atomic_skills
Explore, purchase atomic skills, combat, map interactions.
__init__.py
Atomic Skills package import and utilities.
buy.py
Seamless game browsing and purchasing with Atomic Skills.
combat.py
Combat Python Skills: Aim, Weapons, Shoot, Fight
map.py
Interact with map using keys in Atomic Skills.
move.py
Control character movement with atomic skills and interact with horse.
sell.py
Sell game skills: buy/sell products, switch types with 'e'/'q'.
trade_utils.py
Interact with game shopkeepers for product selection.
composite_skills
Composite game skills: targeting, following, obstacle avoidance.
auto_shoot.py
Automated game AI targets and shoots enemies.
follow.py
Follow skill for Cradle game, prioritizing yellow/gray circles. OCR detection and movement updates.
go_to_icon.py
Icon-guided robot navigation and obstacle avoidance.
navigation.py
Navigation skill for game characters using OpenCV
game_manager.py
GameManager: controls, captures, manages.
io_env.py
Manages IO, logs warnings, handles game events with AutoHotkey/pydirectinput.
lifecycle
skill_registry.py
Skill Registry: Libraries, Retrieval, Conflict Prevention
video
Video-based OCR and frame extraction tools for game recording
- Video-based OCR extractor using OpenCV
- Python script for video frame extraction using
JSONStructure
and VideoSubFinderWXW
.
VideoRecorder.py
Multi-threaded VideoRecorder with OCR support
log
Colorful image logger for text and JSON.
__init__.py
Imports Logger class, directly importable.
logger.py
Colorful logger with image processing in text and JSON.
memory
Manage chat memory with vectors.
__init__.py
Imports and exposes memory classes.
base.py
Base class for memory operations with methods and inheritance.
basic_vector_memory.py
Basic Vector Memory: Basic class for vector memory. JSON queries, load/save.
local_memory.py
LocalMemory: JSON-based local storage for tasks with memory path support.
short_term_memory.py
Manage chat memory with vector stores, similarity search, and embedding.
vector_store.py
Vector Store Interface Abstract Class
planner
Data-driven decision making base planner class.
__init__.py
Imports BasePlanner from base module.
base.py
Base planner class for data gathering, decision-making, and success detection.
planner.py
Python Planner: Gathers, Manages, and Processes Data
util.py
Utility function to retrieve values from dictionaries or objects.
provider
OpenAI provider initialization and functions.
__init__.py
Sets up providers for LLMs, embeddings.
base_embedding.py
Base embedding model provider class with abstract methods
base_llm.py
Base LLM provider class with abstract assemble_prompt method
gd_provider.py
Image captioning and object detection functions with Singleton annotations.
openai.py
OpenAI provider initialization and functions.
utils
Image, JSON, and string manipulation utility library with OpenCV decorator for template matching.
prototype_runner.py
Multi-functional AI game prototype manager.
README.md
Cradle: AI-driven game control framework.
requirements.txt
Python project requirements: libraries listed