Can an AI survive on its own? AI Castaway explores this question by placing a Large Language Model (LLM) agent in a survival game, where it must gather resources, craft tools, and make strategic decisions without human intervention.
This publication examines how different AI agents—powered by GPT-4, LLaMA3, Mixtral, Gemma, and Claude—adapt to a constantly changing environment. The AI navigates challenges using two approaches: Zero-Shot, making fast one-shot decisions, and Agentic, where it selectively retrieves and processes information for smarter choices.
By blending AI-driven reasoning, decision-making, and survival mechanics, AI Castaway pushes the boundaries of autonomous AI agents in interactive environments.
GITHUB
https://github.com/danilotrix86/llm_survival
Video games have evolved from simple pixel-based mechanics to complex, immersive worlds. One of the most exciting advancements is artificial intelligence in gaming, where AI-driven characters can think, adapt, and react dynamically.
AI Castaway explores this frontier by placing a Large Language Model (LLM) in a survival scenario on a remote island. Unlike traditional game AI, which follows scripted behaviors, this system uses LLMs to make real-time decisions, gather resources, and manage survival needs.
This publication examines how LLMs can simulate reasoning, problem-solving, and adaptation in a dynamic environment. It compares two AI approaches—Zero-Shot and Agentic—to determine which is more effective for autonomous survival. By integrating cutting-edge AI with game mechanics, AI Castaway pushes the boundaries of interactive entertainment and AI-driven decision-making.
To explore whether an AI can survive in a dynamic environment, AI Castaway implements an autonomous agent within a survival game. The AI must independently gather resources, craft tools, and manage survival factors such as hunger, thirst, and stress. To achieve this, I developed a system that integrates Large Language Models (LLMs) with decision-making frameworks, creating an adaptive AI-driven experience.
The system consists of three core components:
The AI follows two distinct decision-making approaches:
In this approach, the AI makes decisions based on a single, complete snapshot of its environment. It receives all relevant game data—inventory, health, surroundings, and available actions—at once and generates an immediate response. This method is efficient but has limitations, such as inability to retrieve past experiences beyond the prompt's token limit.
Unlike the Zero-Shot approach, the Agentic method allows the AI to retrieve specific information as needed, much like a human would recall relevant details before making a decision. Using frameworks like LangChain, the AI selectively queries its memory, past actions, and environmental changes before choosing the best course of action. This results in more context-aware and strategic decision-making, improving long-term survival.
LLMs have strict token limits, which affect how much information they can process at once. To overcome this, the system implements:
To assess AI performance, I track:
By combining real-time survival mechanics with AI-driven reasoning, AI Castaway explores the potential of adaptive AI agents in dynamic environments. The system's ability to make strategic, evolving decisions showcases a significant step toward autonomous, decision-making AI in gaming and beyond.
To evaluate the AI’s ability to survive autonomously, I conducted multiple experiments in AI Castaway, testing different decision-making models and AI agent architectures. The focus was on survival efficiency, resource management, and strategic planning.
I evaluated multiple LLMs to compare their effectiveness in survival scenarios:
Each model was tested under identical survival conditions, measuring how well it could make context-aware decisions.
I compared two primary AI strategies:
Zero-Shot Decision-Making
Agentic Decision-Making
To assess performance, I tracked:
Each AI agent started with no knowledge of the environment and had to explore, plan, and survive based on real-time feedback. The AI could interact with objects, prioritize crafting essential tools, and manage its hunger, thirst, and stress levels.
I conducted multiple test runs with different models, observing how well they adapted to new survival challenges and whether the Agentic approach led to superior long-term performance compared to the Zero-Shot method.
Findings revealed significant differences between LLM-based decision-making and traditional game AI approaches. I analyzed how models:
The experiments conducted in AI Castaway provided key insights into how different AI models handle autonomous survival tasks. By comparing various LLMs and decision-making approaches, I evaluated their effectiveness in managing resources, adapting to challenges, and making efficient survival choices.
Zero-Shot Approach
Agentic Approach
Survival Efficiency
Action Optimization
I tested different LLMs to see how well they adapted to survival conditions.
GPT-4o
LLaMA3 (8B & 70B)
Mixtral-8x7B-32768
Gemma-7B-IT & Gemma2-9B-IT
The AI Castaway experiments demonstrate that LLM-powered AI agents can adapt, strategize, and survive in dynamic environments, but they face key challenges. While Zero-Shot decision-making offers speed, it struggles with long-term planning due to memory limitations. The Agentic approach, on the other hand, excels in context-aware decision-making, leading to better survival outcomes despite higher computational demands.
mY findings highlight the importance of memory management, strategic planning, and resource prioritization in AI-driven survival simulations. More advanced models like GPT-4o and LLaMA3-70B performed better in multi-step survival tasks, while faster models like Mixtral and Gemma were more responsive but lacked strategic depth.
These results open up exciting possibilities for AI-driven agents in gaming and beyond. Future work will focus on optimizing decision-making efficiency, hybrid AI models, and refining memory strategies to further enhance autonomous AI survival capabilities.
This research proves that AI can survive on its own—but just like humans, it must learn, adapt, and evolve.
There are no datasets linked
There are no datasets linked
There are no models linked
There are no models linked