10 Commits

Author SHA1 Message Date
empty
5ae63d9df9 feat(engine): 实现行动点系统
- 扩展 AgentState 添加 action_points, max_action_points, last_action_tick 字段
- 新增 ActionFeedback 模型用于返回行动执行结果
- 创建 action_points.py 模块实现行动点消耗与恢复逻辑
- 行动消耗表: vote=1, trigger_skill=2, influence=2, comment/support/chaos=0
- 每 tick 恢复 1 点行动点(不超过 max)
- 行动点不足时拒绝执行并返回失败反馈
- 新增 7 个测试用例,全部 37 个测试通过

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 13:48:33 +08:00
empty
3f75eb26c4 feat(engine): 实现阵营技能树系统
- 新增 FactionSkill、FactionSkillTree、FactionSkills 数据模型
- 创建 faction_skills.py 模块处理技能解锁和效果应用
- 技能解锁条件:power >= cost 且前置技能已解锁
- 技能效果:increase_positive_emotion、reduce_conflict、increase_fear、suppress_others
- 添加 4 个技能树测试用例,全部 30 个测试通过

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 13:25:20 +08:00
empty
75e84f2ba3 feat(engine): 实现阵营投票系统
- 新增 Votes 模型,包含 optimists/fearful 计数和 voted_users 去重列表
- 扩展 Event 模型,添加可选 faction 字段支持投票事件
- 新增 voting.py 模块处理投票逻辑
- 投票规则:每用户每 tick 限投一次,下一 tick 生效
- 投票累加到 factions.power,达到 threshold 触发阵营技能
- 添加 5 个投票系统测试用例,全部 26 个测试通过

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 13:12:22 +08:00
empty
28976d9672 feat(engine): 实现阵营博弈机制
- FactionData 新增 threshold 和 skill 字段
- 修改能量累积逻辑:power 跨 tick 累积
- 阈值改为 10,达到后触发阵营技能
- festival 提升情绪,panic 降低情绪

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 12:10:28 +08:00
empty
cec3e95a4b feat(engine): add story arc system for narrative-driven world
- Add StoryArc and StoryEventResult models
- Create story_arcs.py with progress tracking logic
- Implement two story arcs: civil_unrest and golden_age
- Progress updates based on faction power balance
- Trigger story events when progress reaches threshold
- Add 3 tests for story arc system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 12:06:14 +08:00
empty
1fd318c9e3 feat(engine): add faction power system with event triggers
- Add FactionData model with power and members fields
- Add FactionEventResult model for faction event responses
- Add faction field to AgentState
- Implement faction classification based on emotion
- Add faction event triggers (festival/panic) when power >= 5
- Update StepResponse to include triggered_faction_event
- Add tests for new faction system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 12:01:07 +08:00
empty
296e65ff95 feat(engine): add faction system for social emergence
- Add Factions model (optimists/fearful/neutral)
- Implement classify_faction() based on stance thresholds
- Add update_factions() to track faction distribution
- Add apply_faction_influence() for faction→mood feedback
- Integrate faction system into tick flow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 11:03:52 +08:00
empty
554d37fd4c feat: 添加观点传播系统
- 新增 Stance 数据结构 (optimism/fear)
- 情绪影响 stance (happy→乐观, anxious→恐惧)
- 实现 apply_social_influence 社交影响函数
- 确定性随机选择接触对象
- 单次变化限制 ±0.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 10:50:46 +08:00
empty
af279bedd9 feat: 添加角色事件评论系统
- 新增 Opinion 模型,记录角色对事件的观点
- 新增 opinions.py,基于规则生成观点(支持5种事件×3种情绪)
- 同一事件生命周期内每个 agent 只生成一次观点
- 观点同时记录到 agent.memory
- 新增 3 个测试用例

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 10:42:59 +08:00
empty
8b90d55f02 feat: AI Town MVP - 完整三层架构实现
- Python FastAPI 引擎:世界状态模拟、全局能量条、世界事件系统
- Node.js WebSocket 服务器:实时通信、事件队列批处理
- 前端仪表盘:世界状态可视化、行动日志、事件展示

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 10:29:35 +08:00