Spaces:
Sleeping
Sleeping
File size: 6,705 Bytes
73dbae4 273dfc4 73dbae4 9086f9d 3ee0764 9086f9d b3dc6f8 9086f9d b3dc6f8 9086f9d b3dc6f8 b97ab3c b3dc6f8 b97ab3c b3dc6f8 b97ab3c 9086f9d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
---
title: NPC Social Network AI Simulation
emoji: ๐ค
colorFrom: blue
colorTo: indigo
sdk: gradio
python_version: "3.11"
app_file: app.py
pinned: false
---
## ๐๏ธ Language | ์ธ์ด ์ ํ
- ๐ฐ๐ท [ํ๊ตญ์ด๋ก ๋ณด๊ธฐ](#ํ๊ตญ์ด-์ค๋ช
์)
- ๐บ๐ธ [Read in English](#english-documentation)
---
## ์ฃผ์ ๋ฒ์ ๊ด๋ฆฌ
- 1.0.0v:
> ์์จ ์ฑ์ฅํ AI ์์ด์ ํธ ์์
์๋ฎฌ๋ ์ด์
๊ธฐ๋ณธ ๋์ ํ์ธ ์๋ฃ
> Basic functionality verified for autonomous, self-growing AI agent social simulation.
<br>
---
## ํ๊ตญ์ด ์ค๋ช
์
# ๐ง ์์จ ์ฑ์ฅํ AI ์์ด์ ํธ ์์
์๋ฎฌ๋ ์ด์
> ๊ฐ์ , ๊ธฐ์ต, ๊ฐ์น๊ด์ ๊ฐ์ง NPC๋ค๊ณผ ํจ๊ป ์ด์๊ฐ๋ ๊ฐ์ ์ธ๊ณ



<br>
## ๐ 1. ํ๋ก์ ํธ ์๊ฐ
์ด ํ๋ก์ ํธ๋ ๋จ์ํ ์ ํด์ง ๋์ฌ๋ฅผ ๋ฐ๋ณตํ๋ ๊ฒ์ NPC๋ฅผ ๋์ด, ์์ฒด์ ์ธ ๊ฐ์ , ๊ธฐ์ต, ์ฑ๊ฒฉ, ๊ด๊ณ๋ฅผ ๋ฐํ์ผ๋ก ์ํธ์์ฉํ๋ฉฐ<br>
<strong>์ค์ค๋ก ํ๋จํ๊ณ ์ฑ์ฅํ๋ ๊ฐ์ ์ธ๊ฐ(AI Agent)</strong>์ ๊ตฌํํ๋ AI ์๋ฎฌ๋ ์ด์
์
๋๋ค.
- **ํ๋ซํผ**: ์น ๊ธฐ๋ฐ (Python + Flask)
- **ํต์ฌ ๊ธฐ์ **: LLM (Gemini), Sentence-TransFormers, FAISS
- **์ฃผ์ ๊ธฐ๋ฅ**: ์์จ ํ๋, ๊ธฐ์ต ๊ธฐ๋ฐ ๋ํ, ๊ฐ์น๊ด ํ์ฑ, ์ฑ๊ฒฉ/๊ด๊ณ ๋ณํ, ํ๋ ์ด์ด ๊ฐ์
๋ฑ
<br>
## ๐ 2. ์ฃผ์ ๊ธฐ๋ฅ ๋ฐ ์์คํ
### ๐งฉ ๋์ ๋ฉํฐํด ๋ํ ์์คํ
- ๋จ๋ตํ ๋ฌธ๋ต์ ๋์ด, NPC์ ๊ฐ์ , ๊ธฐ์ต, ๊ด๊ณ๋ฅผ ํ์ฉํ ๊น์ด ์๋ ๋ํ
### ๐ง ์์จ ์์ด์ ํธ ์ํคํ
์ฒ
- LLM ๊ธฐ๋ฐ Reasoner/Planner๊ฐ ์ฅ๊ธฐ ๋ชฉํ์ ํ๋ ๊ณํ์ ์์จ์ ์ผ๋ก ์์ฑ
### ๐ ๊ณ ์ฐจ์ ์์ ์ฑ์ฐฐ ๊ธฐ๋ฅ
- NPC๋ ๊ด๊ณ๋ฅผ ์ฌ์ ์ํ๊ณ ์ค์ค๋ก์ ๊ฐ์น๊ด์ ์ ์ง์ ์ผ๋ก ํ์ฑ
### ๐งญ ์ํฉ ์ธ์ง ๊ธฐ๋ฐ ์ฌํ์ ํ๋
- "๋์ ์ฃผ๊ธฐ" ๋ฑ์ ์ฌํ์ ํ๋์ด ๋ฉ๋ชจ๋ฆฌ์ ๊ด๊ณ์ ์ํฅ์ ์ค
### ๐ง RAG ๊ธฐ๋ฐ ๊ธฐ์ต ์์คํ
- FAISS๋ฅผ ํตํ ์๋ฏธ์ ๊ธฐ์ต ๊ฒ์ ๋ฐ ํ์ฉ (Sentence-Transformers + LLM)
### ๐น๏ธ ํ๋ ์ด์ด ๊ฐ์
์์คํ
- ๊ด๊ณ ์ค์ , ์ด๋ฒคํธ ์ ๋ ๋ฑ์ผ๋ก NPC ์ธ๊ณ์ ์ค์๊ฐ ๊ฐ์
๊ฐ๋ฅ
<br>
## ๐ผ๏ธ 3. ์๊ฐํ: ์๋ ๊ด์ฐฐ์ ๋์๋ณด๋
> NPC๋ค์ ๋ด๋ฉด ์ํ์ ๊ด๊ณ ๋ณํ๋ฅผ ์ค์๊ฐ์ผ๋ก ์๊ฐํํ๋ ์น ๊ธฐ๋ฐ ๋์๋ณด๋์
๋๋ค.<br>

<br>
## ๐งฐ 4. ์ฌ์ฉ ๊ธฐ์ ์คํ
- **AI/ML**: Google Gemini, Sentence-Transformers, FAISS
- **Frontend**: HTML, CSS
- **Backend**: Python 3.10, Flask
- **Memory Architecture**: RAG
<br>
## โ๏ธ 5. ์ค์น ๋ฐ ์คํ ๋ฐฉ๋ฒ
```bash
# 1. ํด๋ก
git clone http://github.com/Rorshi/autonomous-ai-agent-sim.git
cd autonomous-ai-agent-sim
# 2. ํ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น
pip install -r requirements.txt
# 3. ์คํ
python app.py
http://127.0.0.1:5000 ์ ์
# 4. LLM ๋ชจ๋ธ ์ ํ ๋ฐ API Key ์
๋ ฅ
# 5. ์์ ์ค์ (์ ํ ์ฌํญ)
autonomous-ai-agent-sim\npc_social_network\scenarios\scenario_setup.py ํ์ผ ์์
```
## ๐ค 6. ๊ธฐ์ฌ / ๋ผ์ด์ ์ค
- ์ด ํ๋ก์ ํธ๋ **๊ฐ์ธ ํฌํธํด๋ฆฌ์ค ๋ฐ ์ฐ๊ตฌ ๋ชฉ์ **์ผ๋ก ์ ์๋์์ต๋๋ค.
- ์ธ๋ถ ์ฌ์ฉ์์ Issue ๋ฐ Pull Request๋ ๊ฒํ ํ ๋ฐ์ํ ์ ์์ต๋๋ค.
- ์ด ํ๋ก์ ํธ์ ์ ์๊ถ์ <strong>[@Rorshi](https://github.com/Rorshi)</strong>์๊ฒ ์์ผ๋ฉฐ, ๋ฌด๋จ ์ฌ์ฉ, ์์ , ๋ฐฐํฌ๋ฅผ ๊ธ์งํฉ๋๋ค.
> โ๏ธ ์ด์ฉ ๋ฐ ํ์
๋ฌธ์: [email protected]
<br>
<br>
---
## English Documentation
# ๐ง Autonomous AI Agent Social Simulation
> A virtual world where NPCs grow through emotion, memory, and personal values



<br>
## ๐ 1. Project Overview
This project aims to go beyond traditional NPCs with predefined dialogue.
It simulates **virtual humans (AI Agents)** capable of autonomous interaction, emotion, memory, personality, and growth.
- **Platform**: Web-based (Python + Flask)
- **Core Technologies**: LLM (Gemini), Sentence-Transformers, FAISS
- **Key Features**: Autonomous behavior, memory-based dialogue, evolving values and personality, player intervention
<br>
## ๐ 2. Key Features and Systems
### ๐งฉ Dynamic Multi-turn Dialogue System
- NPCs engage in deep, contextual conversations based on emotion, memory, and relationships
### ๐ง Autonomous Agent Architecture
- Each NPC utilizes LLM-based Reasoners and Planners to formulate long-term goals and actionable plans
### ๐ Higher-Order Cognitive Reflection
- NPCs redefine their relationships and gradually form personal values over time
### ๐งญ Context-Aware Social Behavior
- NPCs perform social actions like "helping" and simulate their effects on memory and relationships
### ๐ง RAG-based Memory System
- Semantic memory retrieval using FAISS + Sentence-Transformers to enhance dialogue relevance
### ๐น๏ธ Player Intervention System
- Players can modify relationships or trigger events to observe and influence NPC responses in real time
<br>
## ๐ผ๏ธ 3. Visualization: World Observer Dashboard
> A web-based dashboard that visualizes NPCs' internal states and relationship changes in real time

<br>
## ๐งฐ 4. Technology Stack
- **AI/ML**: Google Gemini, Sentence-Transformers, FAISS
- **Frontend**: HTML, CSS
- **Backend**: Python 3.10, Flask
- **Memory Architecture**: RAG (Retrieval-Augmented Generation)
<br>
## โ๏ธ 5. Setup & Run Instructions
```bash
# 1. Clone the repository
git clone http://github.com/Rorshi/autonomous-ai-agent-sim.git
cd autonomous-ai-agent-sim
# 2. Install required packages
pip install -r requirements.txt
# 3. Run the app
python app.py
# Access the app at:
http://127.0.0.1:5000
# 4. Choose LLM model and enter your API key
# 5. (Optional) Configure initial setup
Edit the file:
autonomous-ai-agent-sim\npc_social_network\scenarios\scenario_setup.py
```
## ๐ค 6. Contribution & License
This project is intended for personal portfolio and research purposes.
External contributions via Issues and Pull Requests are welcome and will be reviewed case-by-case.
All rights reserved by @Rorshi.
Unauthorized use, modification, or redistribution is strictly prohibited.
> โ๏ธ For inquiries or collaboration requests: [email protected]
<br>
[Back to top](#ํ๊ตญ์ด-์ค๋ช
์) |