humanda5
Fix Hugging Face environment configuration
273dfc4

A newer version of the Gradio SDK is available: 5.43.1

Upgrade
metadata
title: NPC Social Network AI Simulation
emoji: ๐Ÿค–
colorFrom: blue
colorTo: indigo
sdk: gradio
python_version: '3.11'
app_file: app.py
pinned: false

๐Ÿ—‚๏ธ Language | ์–ธ์–ด ์„ ํƒ


์ฃผ์š” ๋ฒ„์ „ ๊ด€๋ฆฌ

  • 1.0.0v:

    ์ž์œจ ์„ฑ์žฅํ˜• AI ์—์ด์ „ํŠธ ์†Œ์…œ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ๊ธฐ๋ณธ ๋™์ž‘ ํ™•์ธ ์™„๋ฃŒ Basic functionality verified for autonomous, self-growing AI agent social simulation.


ํ•œ๊ตญ์–ด ์„ค๋ช…์„œ

๐Ÿง  ์ž์œจ ์„ฑ์žฅํ˜• AI ์—์ด์ „ํŠธ ์†Œ์…œ ์‹œ๋ฎฌ๋ ˆ์ด์…˜

๊ฐ์ •, ๊ธฐ์–ต, ๊ฐ€์น˜๊ด€์„ ๊ฐ€์ง„ NPC๋“ค๊ณผ ํ•จ๊ป˜ ์‚ด์•„๊ฐ€๋Š” ๊ฐ€์ƒ ์„ธ๊ณ„

Python Flask License

๐Ÿ“ 1. ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ

์ด ํ”„๋กœ์ ํŠธ๋Š” ๋‹จ์ˆœํžˆ ์ •ํ•ด์ง„ ๋Œ€์‚ฌ๋ฅผ ๋ฐ˜๋ณตํ•˜๋Š” ๊ฒŒ์ž„ NPC๋ฅผ ๋„˜์–ด, ์ž์ฒด์ ์ธ ๊ฐ์ •, ๊ธฐ์–ต, ์„ฑ๊ฒฉ, ๊ด€๊ณ„๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ƒํ˜ธ์ž‘์šฉํ•˜๋ฉฐ
์Šค์Šค๋กœ ํŒ๋‹จํ•˜๊ณ  ์„ฑ์žฅํ•˜๋Š” ๊ฐ€์ƒ ์ธ๊ฐ„(AI Agent)์„ ๊ตฌํ˜„ํ•˜๋Š” AI ์‹œ๋ฎฌ๋ ˆ์ด์…˜์ž…๋‹ˆ๋‹ค.

  • ํ”Œ๋žซํผ: ์›น ๊ธฐ๋ฐ˜ (Python + Flask)
  • ํ•ต์‹ฌ ๊ธฐ์ˆ : LLM (Gemini), Sentence-TransFormers, FAISS
  • ์ฃผ์š” ๊ธฐ๋Šฅ: ์ž์œจ ํ–‰๋™, ๊ธฐ์–ต ๊ธฐ๋ฐ˜ ๋Œ€ํ™”, ๊ฐ€์น˜๊ด€ ํ˜•์„ฑ, ์„ฑ๊ฒฉ/๊ด€๊ณ„ ๋ณ€ํ™”, ํ”Œ๋ ˆ์ด์–ด ๊ฐœ์ž… ๋“ฑ

๐Ÿš€ 2. ์ฃผ์š” ๊ธฐ๋Šฅ ๋ฐ ์‹œ์Šคํ…œ

๐Ÿงฉ ๋™์  ๋ฉ€ํ‹ฐํ„ด ๋Œ€ํ™” ์‹œ์Šคํ…œ

  • ๋‹จ๋‹ตํ˜• ๋ฌธ๋‹ต์„ ๋„˜์–ด, NPC์˜ ๊ฐ์ •, ๊ธฐ์–ต, ๊ด€๊ณ„๋ฅผ ํ™œ์šฉํ•œ ๊นŠ์ด ์žˆ๋Š” ๋Œ€ํ™”

๐Ÿง  ์ž์œจ ์—์ด์ „ํŠธ ์•„ํ‚คํ…์ฒ˜

  • LLM ๊ธฐ๋ฐ˜ Reasoner/Planner๊ฐ€ ์žฅ๊ธฐ ๋ชฉํ‘œ์™€ ํ–‰๋™ ๊ณ„ํš์„ ์ž์œจ์ ์œผ๋กœ ์ƒ์„ฑ

๐Ÿ” ๊ณ ์ฐจ์› ์ž์•„ ์„ฑ์ฐฐ ๊ธฐ๋Šฅ

  • NPC๋Š” ๊ด€๊ณ„๋ฅผ ์žฌ์ •์˜ํ•˜๊ณ  ์Šค์Šค๋กœ์˜ ๊ฐ€์น˜๊ด€์„ ์ ์ง„์ ์œผ๋กœ ํ˜•์„ฑ

๐Ÿงญ ์ƒํ™ฉ ์ธ์ง€ ๊ธฐ๋ฐ˜ ์‚ฌํšŒ์  ํ–‰๋™

  • "๋„์›€ ์ฃผ๊ธฐ" ๋“ฑ์˜ ์‚ฌํšŒ์  ํ–‰๋™์ด ๋ฉ”๋ชจ๋ฆฌ์™€ ๊ด€๊ณ„์— ์˜ํ–ฅ์„ ์คŒ

๐Ÿง  RAG ๊ธฐ๋ฐ˜ ๊ธฐ์–ต ์‹œ์Šคํ…œ

  • FAISS๋ฅผ ํ†ตํ•œ ์˜๋ฏธ์  ๊ธฐ์–ต ๊ฒ€์ƒ‰ ๋ฐ ํ™œ์šฉ (Sentence-Transformers + LLM)

๐Ÿ•น๏ธ ํ”Œ๋ ˆ์ด์–ด ๊ฐœ์ž… ์‹œ์Šคํ…œ

  • ๊ด€๊ณ„ ์„ค์ •, ์ด๋ฒคํŠธ ์œ ๋„ ๋“ฑ์œผ๋กœ NPC ์„ธ๊ณ„์— ์‹ค์‹œ๊ฐ„ ๊ฐœ์ž… ๊ฐ€๋Šฅ

๐Ÿ–ผ๏ธ 3. ์‹œ๊ฐํ™”: ์›”๋“œ ๊ด€์ฐฐ์ž ๋Œ€์‹œ๋ณด๋“œ

NPC๋“ค์˜ ๋‚ด๋ฉด ์ƒํƒœ์™€ ๊ด€๊ณ„ ๋ณ€ํ™”๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์‹œ๊ฐํ™”ํ•˜๋Š” ์›น ๊ธฐ๋ฐ˜ ๋Œ€์‹œ๋ณด๋“œ์ž…๋‹ˆ๋‹ค.
Dashboard Example

๐Ÿงฐ 4. ์‚ฌ์šฉ ๊ธฐ์ˆ  ์Šคํƒ

  • AI/ML: Google Gemini, Sentence-Transformers, FAISS
  • Frontend: HTML, CSS
  • Backend: Python 3.10, Flask
  • Memory Architecture: RAG

โš™๏ธ 5. ์„ค์น˜ ๋ฐ ์‹คํ–‰ ๋ฐฉ๋ฒ•

# 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๋Š” ๊ฒ€ํ†  ํ›„ ๋ฐ˜์˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ด ํ”„๋กœ์ ํŠธ์˜ ์ €์ž‘๊ถŒ์€ @Rorshi์—๊ฒŒ ์žˆ์œผ๋ฉฐ, ๋ฌด๋‹จ ์‚ฌ์šฉ, ์ˆ˜์ •, ๋ฐฐํฌ๋ฅผ ๊ธˆ์ง€ํ•ฉ๋‹ˆ๋‹ค.

    โœ‰๏ธ ์ด์šฉ ๋ฐ ํ˜‘์—… ๋ฌธ์˜: saffad4851@gmail.com




English Documentation

๐Ÿง  Autonomous AI Agent Social Simulation

A virtual world where NPCs grow through emotion, memory, and personal values

Python Flask License

๐Ÿ“ 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

๐Ÿš€ 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

๐Ÿ–ผ๏ธ 3. Visualization: World Observer Dashboard

A web-based dashboard that visualizes NPCs' internal states and relationship changes in real time
Dashboard Example

๐Ÿงฐ 4. Technology Stack

  • AI/ML: Google Gemini, Sentence-Transformers, FAISS
  • Frontend: HTML, CSS
  • Backend: Python 3.10, Flask
  • Memory Architecture: RAG (Retrieval-Augmented Generation)

โš™๏ธ 5. Setup & Run Instructions

# 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: saffad4851@gmail.com


Back to top