社交学习层 & 趣味增强模块设计
让学习充满人情味和乐趣,贴近罗博深教育理念
设计理念
罗博深核心洞察
"AI时代,'熟能生巧'已被机器掌握。我们需要学习如何带着人类特有的好奇心、创造力和情感表达,在既定'课本'之外进行思考和推理。"
我们的目标
- 人的温度 - 即使是AI系统,也要有"人味"
- 社交互动 - 学习不是孤独的,而是社区的
- 榜样激励 - 看到同龄人的优秀,激发动力
- 趣味性 - 让数学课堂充满欢笑
架构总览
┌─────────────────────────────────────────────────────────────────┐
│ Social Learning Layer │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ 学习社区 │ │ 榜样系统 │ │ 协作学习 │ │
│ │ Community │ │ Role Model │ │ Collaboration│ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ └─────────────────┼─────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Social Event Bus │ │
│ │ (学习动态、成就、挑战、讨论、点赞、评论) │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
├─────────────────────────────────────────────────────────────────┤
│ Fun Enhancement Layer │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ AI 角色 │ │ 游戏化引擎 │ │ 成就系统 │ │
│ │ Personas │ │ Gamification│ │ Achievements │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ 故事线 │ │ 挑战赛 │ │ 幽默系统 │ │
│ │ Storyline │ │ Challenges │ │ Humor Engine │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
├─────────────────────────────────────────────────────────────────┤
│ Creative Thinking Layer │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ 开放问题 │ │ 多解法探索 │ │ 假设思考 │ │
│ │ Open-ended │ │ Multi-solve │ │ What-if │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
1. 社交学习层 (Social Learning)
1.1 学习社区 (Learning Community)
# 核心实体
class LearningGroup:
"""学习小组"""
id: str
name: str
members: List[str] # student_ids
created_by: str
topic: str # 学习主题
class Discussion:
"""讨论帖"""
id: str
group_id: str
author_id: str
knowledge_point_id: str
title: str
content: str
solution_attempts: List[SolutionAttempt] # 解法尝试
likes: int
comments: List[Comment]
class SolutionAttempt:
"""解法尝试"""
id: str
author_id: str
content: str
is_correct: bool
creativity_score: float # 创意分
elegance_score: float # 优雅分
upvotes: int
1.2 榜样系统 (Role Model System)
灵感来源: LIVE 的高中生 Star 老师
class RoleModel:
"""榜样/学长学姐"""
id: str
name: str
avatar: str
grade: str # 年级
achievements: List[Achievement]
specialties: List[str] # 擅长领域
learning_story: str # 学习故事
tips: List[str] # 学习建议
class ExemplaryWork:
"""优秀作品展示"""
id: str
author_id: str
knowledge_point_id: str
problem: str
solution: str
approach: str # 解题思路
creativity_highlights: List[str] # 创意亮点
teacher_comments: str # 老师点评
featured_at: datetime
1.3 协作学习 (Collaborative Learning)
class PeerChallenge:
"""同伴挑战"""
challenger_id: str
challenged_id: str
knowledge_point_id: str
problem: str
time_limit: int # 秒
class StudyBuddy:
"""学习搭档匹配"""
student_a: str
student_b: str
compatibility_score: float
shared_goals: List[str]
class GroupProblemSolving:
"""小组解题"""
group_id: str
problem: str
contributions: Dict[str, str] # student_id -> contribution
final_solution: str
collaboration_score: float
2. 趣味增强层 (Fun Enhancement)
2.1 AI 角色系统 (AI Personas)
不同性格的虚拟老师,让学习更有趣
class AIPersona:
"""AI 教师角色"""
id: str
name: str
avatar: str
personality: str # 性格类型
speaking_style: str # 说话风格
catchphrases: List[str] # 口头禅
encouragement_style: str
humor_level: float # 0-1 幽默程度
# 预设角色
PERSONAS = [
AIPersona(
id="mentor_wise",
name="智慧老师",
personality="沉稳睿智",
speaking_style="循循善诱,喜欢用故事和类比",
catchphrases=["让我们一起思考...", "有趣的是..."],
humor_level=0.3
),
AIPersona(
id="mentor_energetic",
name="活力老师",
personality="热情活泼",
speaking_style="充满能量,喜欢用夸张的表达",
catchphrases=["太棒了!", "哇,这个想法超级酷!"],
humor_level=0.8
),
AIPersona(
id="mentor_buddy",
name="学长助教",
personality="亲切随和",
speaking_style="像朋友一样聊天,分享自己的学习经历",
catchphrases=["我当时也卡在这里", "告诉你一个小技巧"],
humor_level=0.6
),
AIPersona(
id="mentor_challenger",
name="挑战者",
personality="机智挑衅",
speaking_style="喜欢出难题,激发斗志",
catchphrases=["你敢接受挑战吗?", "这题你肯定不会..."],
humor_level=0.5
),
]
2.2 游戏化引擎 (Gamification Engine)
class GamificationEngine:
"""游戏化系统"""
# 经验值系统
def award_xp(self, student_id: str, action: str, amount: int)
def get_level(self, student_id: str) -> int
# 成就系统
def check_achievements(self, student_id: str) -> List[Achievement]
def unlock_achievement(self, student_id: str, achievement_id: str)
# 每日任务
def generate_daily_quests(self, student_id: str) -> List[Quest]
def complete_quest(self, student_id: str, quest_id: str)
# 连续学习
def update_streak(self, student_id: str) -> int
def get_streak_rewards(self, streak_days: int) -> List[Reward]
# 成就定义
ACHIEVEMENTS = [
# 学习里程碑
Achievement("first_step", "迈出第一步", "完成第一个知识点", "🎯"),
Achievement("quick_learner", "快速学习者", "一天内掌握5个知识点", "⚡"),
Achievement("persistent", "坚持不懈", "连续学习7天", "🔥"),
Achievement("master_100", "百炼成钢", "掌握100个知识点", "🏆"),
# 创造性思维
Achievement("creative_solver", "创意解题王", "提交10个被认可的创意解法", "💡"),
Achievement("multi_path", "条条大路", "用3种不同方法解同一题", "🛤️"),
Achievement("what_if_explorer", "假设探险家", "完成20个假设思考题", "🔮"),
# 社交成就
Achievement("helper", "乐于助人", "帮助10位同学解决问题", "🤝"),
Achievement("popular_solution", "人气解法", "解法获得50个点赞", "❤️"),
Achievement("discussion_starter", "讨论发起者", "发起的讨论获得100条回复", "💬"),
# 挑战成就
Achievement("challenger", "挑战者", "赢得10次同伴挑战", "⚔️"),
Achievement("comeback_kid", "逆转王", "在挑战中落后后反超", "🔄"),
]
2.3 故事线系统 (Storyline System)
class LearningStoryline:
"""学习故事线 - 让学习像闯关游戏"""
chapters: List[Chapter]
current_chapter: int
protagonist: str # 学生名字
class Chapter:
"""章节"""
id: str
title: str
narrative: str # 故事背景
mission: str # 任务描述
knowledge_points: List[str]
boss_challenge: str # 章节BOSS题
rewards: List[Reward]
# 示例故事线
MATH_ADVENTURE = LearningStoryline(
name="数学大冒险",
chapters=[
Chapter(
title="神秘的数字王国",
narrative="你来到了一个由数字组成的奇妙王国,这里的居民都是数字精灵...",
mission="帮助数字精灵们解决他们的问题,解锁通往下一个区域的大门",
knowledge_points=["变量", "方程", "函数基础"],
boss_challenge="数字王国的守门人出了一道难题...",
),
Chapter(
title="几何迷宫",
narrative="你进入了一个由几何图形构成的迷宫,每个转角都藏着谜题...",
mission="运用几何知识找到迷宫的出口",
knowledge_points=["三角形", "圆", "面积计算"],
),
# ...更多章节
]
)
2.4 幽默系统 (Humor Engine)
class HumorEngine:
"""幽默引擎 - 让学习充满欢笑"""
def add_humor(self, content: str, humor_level: float) -> str:
"""为教学内容添加幽默元素"""
def get_encouragement(self, situation: str) -> str:
"""获取鼓励语(带幽默)"""
def get_failure_response(self, attempt_count: int) -> str:
"""答错时的回应(不打击信心)"""
# 幽默素材库
HUMOR_TEMPLATES = {
"correct_answer": [
"🎉 完全正确!你的脑细胞今天可真给力!",
"✨ 答对了!数学之神对你微笑~",
"🚀 Bingo!你是不是偷偷开挂了?",
"👏 太棒了!这道题被你拿捏得死死的!",
],
"wrong_answer": [
"🤔 差一点点!你的思路其实很接近了",
"💪 没关系,爱因斯坦小时候数学也挂过科(好吧这是谣言)",
"🎯 方向对了,只是稍微偏离了目标,再试一次?",
"🌟 错误是成功之母,你刚刚生了个小成功!",
],
"streak_broken": [
"😅 连续学习中断了...但没关系,明天又是新的开始!",
"🔄 小憩一下也好,大脑需要休息才能更好地装知识~",
],
"difficult_topic": [
"😱 这道题确实有点难,但你比这道题更厉害!",
"🧗 这是一座小山,但你已经爬过很多山了",
],
}
3. 创造性思维层 (Creative Thinking)
3.1 开放问题系统 (Open-ended Problems)
class OpenEndedProblem:
"""开放性问题 - 没有标准答案"""
id: str
topic: str
question: str
context: str
evaluation_criteria: List[str] # 评估维度
sample_approaches: List[str] # 可能的思路方向
# 示例
OPEN_PROBLEMS = [
OpenEndedProblem(
topic="函数应用",
question="如果你是城市规划师,如何用数学模型优化公交车线路?",
evaluation_criteria=["问题分析", "模型建立", "创意程度", "可行性"],
),
OpenEndedProblem(
topic="几何思维",
question="设计一个只用直尺和圆规就能画出的有趣图案,并解释其中的数学原理",
evaluation_criteria=["美观度", "数学原理", "创意程度"],
),
]
3.2 多解法探索 (Multi-Solution Explorer)
class MultiSolutionChallenge:
"""多解法挑战 - 鼓励用多种方法解题"""
problem: str
minimum_solutions: int # 最少要求的解法数
known_approaches: List[Approach]
bonus_for_new_approach: int # 发现新解法的奖励
class Approach:
"""解法"""
name: str
description: str
elegance_rating: float
difficulty_rating: float
# 示例
MULTI_SOLVE_CHALLENGE = MultiSolutionChallenge(
problem="证明勾股定理",
minimum_solutions=3,
known_approaches=[
Approach("面积法", "通过比较面积来证明"),
Approach("相似三角形", "利用三角形相似性质"),
Approach("坐标法", "在坐标系中证明"),
# 历史上有超过400种证明方法!
],
)
3.3 假设思考 (What-If Thinking)
class WhatIfScenario:
"""假设思考场景"""
base_concept: str
what_if_question: str
exploration_guide: List[str]
mind_expanding_points: List[str]
# 示例
WHAT_IF_SCENARIOS = [
WhatIfScenario(
base_concept="负数",
what_if_question="如果从来没有人发明负数,数学会变成什么样?",
exploration_guide=[
"想想温度计没有负数会怎样",
"银行账户怎么表示欠款",
"方程 x + 5 = 3 怎么解",
],
mind_expanding_points=[
"负数的发明经历了很长时间的争议",
"古人认为负数'不存在'",
],
),
WhatIfScenario(
base_concept="圆周率",
what_if_question="如果π不是无理数,而是一个简单的分数,世界会有什么不同?",
),
]
4. 数据模型
4.1 社交事件
class SocialEvent:
"""社交事件 - 统一的事件总线"""
id: str
event_type: str # discussion, achievement, challenge, like, comment
actor_id: str
target_id: Optional[str]
content: Dict[str, Any]
created_at: datetime
visibility: str # public, group, private
4.2 学生社交画像
class StudentSocialProfile:
"""学生社交画像"""
student_id: str
# 基础数据
xp: int
level: int
streak_days: int
# 成就
achievements: List[str]
badges: List[str]
# 社交
friends: List[str]
groups: List[str]
followers: int
following: int
# 贡献
solutions_shared: int
helps_given: int
discussions_started: int
# 偏好
preferred_persona: str
humor_preference: float
5. API 设计
# 社交 API
POST /api/education/social/groups # 创建学习小组
GET /api/education/social/groups/{id}/members # 获取小组成员
POST /api/education/social/discussions # 发起讨论
POST /api/education/social/solutions # 分享解法
POST /api/education/social/challenges # 发起挑战
# 游戏化 API
GET /api/education/gamification/profile # 获取游戏化画像
GET /api/education/gamification/achievements # 获取成就列表
GET /api/education/gamification/quests # 获取每日任务
POST /api/education/gamification/quests/{id}/complete
# AI 角色 API
GET /api/education/personas # 获取可用角色
PUT /api/education/personas/select # 选择角色
POST /api/education/teach # 教学(带角色风格)
# 创造性思维 API
GET /api/education/creative/open-problems # 获取开放问题
POST /api/education/creative/solutions # 提交创意解法
GET /api/education/creative/what-if # 获取假设思考题
6. 实现优先级
| 优先级 | 模块 | 说明 |
|---|---|---|
| P0 | AI 角色系统 | 立即增加趣味性,改变教学风格 |
| P0 | 幽默系统 | 让回复更有人情味 |
| P0 | 成就系统 | 即时反馈和激励 |
| P1 | 每日任务 | 提高日活和学习动力 |
| P1 | 解法分享 | 看到优秀解法,互相学习 |
| P1 | 多解法挑战 | 培养创造性思维 |
| P2 | 学习小组 | 社交互动 |
| P2 | 故事线系统 | 沉浸式学习体验 |
| P2 | 同伴挑战 | 竞争激励 |
| P3 | 榜样系统 | 需要积累真实数据 |
| P3 | 开放问题 | 需要高质量内容 |
7. 技术实现
使用现有 MBE 架构扩展:
src/education/
├── social/
│ ├── __init__.py
│ ├── community.py # 学习社区
│ ├── role_model.py # 榜样系统
│ └── collaboration.py # 协作学习
├── fun/
│ ├── __init__.py
│ ├── personas.py # AI 角色
│ ├── gamification.py # 游戏化
│ ├── achievements.py # 成就系统
│ ├── storyline.py # 故事线
│ └── humor.py # 幽默引擎
├── creative/
│ ├── __init__.py
│ ├── open_problems.py # 开放问题
│ ├── multi_solve.py # 多解法
│ └── what_if.py # 假设思考