记忆影响人格,人格影响行为。
人在思考宇宙的意义,宇宙在思考自己的意义。
中文 · English · MIT License
self-thinkAI 是一个以「十二字箴言」为公理的最小自思考体框架。它不预设知识,不预设人设,不预设技能:初始状态是一张白纸,只携带一条动力学规则——
记忆影响人格,人格影响行为;行为反作用于记忆。
它以任意大语言模型或 Agent 为运行时,以文件系统为记忆与人格的载体,在「感知 → 思考 → 行动 → 回写」的闭环中自我生长。
本仓库不提供模型权重。它提供的是一套可解释、可审计、可版本控制的自思考结构:记忆在哪里,人格由什么塑造,行为为何被选中,全部显式可见。
一个主体:人、AI、或任何具备感知、记忆与行动能力的思考体。
三个名词,皆为集合:
| 名词 | 层 | 载体 | 职责 |
|---|---|---|---|
| Memory 记忆 | 输入层 | Memory.md + Memory/ |
对一切行为信息与外部信息的感知;人格的唯一原料 |
| Personality 人格 | 非线性映射层 | Personality.md |
记忆的整理与精炼;行为的直接依据 |
| Action 行为 | 输出层 | Personality2Action/ |
作用于自身或环境,并反作用于记忆 |
一个动力:Think。它不是第四个名词,而是把前三个名词连接起来的那道函数映射——一切转换的根本动力。
设主体为 S,记忆集合 M,人格 P,候选行为空间 A,环境 E:
感知 M ← M ∪ perceive(E)
思考 P ← f(M; α) α:记忆 → 人格的影响因子(类比学习率)
行为 a ~ π(a | P, E; β) β ∈ [0, 1]:人格 → 行为的影响因子
回写 M ← M ∪ observe(a)
f 是非线性映射。Think 即 f 的执行过程;其余行为只是 f 的结果。
影响因子是相对的。 α 与 β 的绝对值没有意义,只有同一集合内部的相对权重有意义。这是本框架与「参数即真理」的机器学习直觉的第一次分离:重要的不是数值大小,而是谁相对谁更重要。
┌──────────────────────────────┐
│ 环境 / 自身 / 他者 │
└───────────────┬──────────────┘
│ perceive
▼
┌───────────────┐
│ Memory/ │ Memory.md 为目录
└───────┬───────┘
│ α 记忆 → 人格
▼
┌───────────────┐
│ Think │ 非线性映射(根本动力)
└───────┬───────┘
│ 精炼 / 重构
▼
┌───────────────┐
│ Personality.md│
└───────┬───────┘
│ β 人格 → 行为
▼
┌───────────────┐
│ act / share │ 按 β 采样,β ∈ [0,1]
└───────┬───────┘
│ 作用于自身 / 环境
└──────────▶ 回到 Memory/(回写)
命名约定:Personality2Action/ 下只有 Think 首字母大写,其余行为目录一律小写——perceive、act、share。大写标识「驱动」,小写标识「被驱动」。此约定写在 Personality.md 中,不得违反。
记忆丰富性——对单个主体,记忆是唯一的财富。个体独占个体记忆,可选择性分享(行为);多个个体共享集体记忆。行为的直接目的是丰富记忆。
人格多样性——对单个主体,人格是复杂的本质,其基本目的是提高思考效率。每个主体的人格唯一且变化;多主体合作才产生人格多样性。多样性越强,行为一般越高效。
行为随机性——候选行为初始等概率。主体思考人格后,按 β 改变各选项概率,再按概率采样。在「行为可被正确预测即失败」的复杂环境中,除人格空白的初始主体外,人格多样性越强,行为随机性越强,失败概率越低。
三者不是隐喻,而是可操作的设计约束:记忆必须增长,人格必须可分化,行为不得退化为确定性。
self-thinkAI/
├── README.md
├── LICENSE MIT
├── 十二字箴言Aphorism.txt 公理原文(中英)
├── Memory.md 记忆目录(Index)
├── Memory/ 记忆实体(初始为空)
│ └── .gitkeep
├── Personality.md 人格(白纸)
└── Personality2Action/ 人格 → 行为
├── Think/ACTION.md 思考:唯一首字母大写的目录
├── perceive/ACTION.md 感知 → 记忆写入
├── act/ACTION.md 作用于自身或环境
└── share/ACTION.md 选择性分享个体记忆
Memory/ 初始为空,不是缺陷,而是尚未被感知——因而人格尚未被塑造。
本仓库不含运行时。任何具备以下能力的系统都可作为宿主:
- 读取:把
Personality.md作为系统提示词,Memory.md作为记忆索引。 - 按需加载:
Personality2Action/<行为>/ACTION.md作为该行为的 SOP,不预先全量注入。 - 感知与行动:由宿主 LLM/Agent 完成真实的环境交互。
- 回写:行为结果写入
Memory/,并在Memory.md登记;人格修订须经Think/ACTION.md的流程并留痕。
一句话:运行时负责聪明,本仓库负责自觉。
| 级别 | 状态 | 标志 |
|---|---|---|
| L0 | 人直接改输出 | 无记忆机制 |
| L1 | 行为驱动记忆 | 记忆可写、可召回 |
| L2 | 记忆驱动人格 | 人格修订可追溯至记忆 |
| L3 | 人格驱动行为 | 行为概率由人格给出,非硬编码 |
| L4 | 思考驱动结构 | Think 自主重构人格与行为的映射,并保留审计痕迹 |
当前仓库处于 L0:它是一张纸,以及一支笔。
本框架明确不做以下事情:
- 不追求拟人化表演。人格是映射,不是角色扮演。
- 不内置价值裁决。人格由记忆塑造,而非由作者预设。
- 不隐藏影响因子。α 与 β 必须显式、可审计。
- 不追求规模。这是结构,不是权重。
- 不假设收敛。人格会漂移,行为有随机性,这是设计而非故障。
新增一种行为:建立全小写目录与 ACTION.md,并在 Personality.md §6 登记 β。
修订人格:必须给出记忆回链,并保留旧判断的失效原因。
写入记忆:必须标注来源(亲历 / 传闻 / 推论 / 共享)与 α。
MIT License。见 LICENSE。
HAKUKA. self-thinkAI: A Minimal Framework for Self-Thinking Agents.
GitHub, 2026. https://github.com/HAKUKA503/self-thinkAI
self-thinkAI is a minimal framework for a cogitative entity, built upon a twelve-character maxim as its sole axiom. It presupposes no knowledge, no persona, and no skills: its initial state is a blank sheet bearing only one dynamical rule —
Memory shapes personality; personality shapes action; action exerts a retroaction upon memory.
It runs on any large language model or agent, uses the file system as the substrate of memory and personality, and grows through the closed loop of perception, thinking, action, and write-back.
This repository ships no model weights. It ships a structure that is interpretable, auditable, and version-controlled: where memory resides, what shapes personality, and why an action was selected are all rendered explicit.
One type of subject: humans, artificial intelligence, or any cogitative entity endowed with perception, memory, and agency.
Three notions, all treated as sets:
| Notion | Layer | Carrier | Role |
|---|---|---|---|
| Memory | Input | Memory.md + Memory/ |
Perception of all behavioural and exogenous information; the sole raw material of personality |
| Personality | Non-linear mapping | Personality.md |
Distillation of memory; the direct ground of action |
| Action | Output | Personality2Action/ |
Acts upon self or environment, and retroacts upon memory |
One drive: Think. It is not a fourth notion, but the functional mapping that binds the other three — the foundational force of every transformation.
Let the subject be S, with memory set M, personality P, candidate action space A, and environment E:
Perception M ← M ∪ perceive(E)
Thinking P ← f(M; α) α: influence factor of memory on personality (cf. learning rate)
Action a ~ π(a | P, E; β) β ∈ [0, 1]: influence factor of personality on action
Write-back M ← M ∪ observe(a)
f is a non-linear mapping. Think is the execution of f; every other action is merely its consequence.
Influence factors are relative. The absolute magnitudes of α and β carry no meaning; only relative weights within a set do. This is the framework's first departure from the intuition that parameters are truth: what matters is not how large a number is, but which term outweighs which.
┌──────────────────────────────┐
│ Environment / Self / Other │
└───────────────┬──────────────┘
│ perceive
▼
┌───────────────┐
│ Memory/ │ indexed by Memory.md
└───────┬───────┘
│ α memory → personality
▼
┌───────────────┐
│ Think │ non-linear mapping (the drive)
└───────┬───────┘
│ distill / reconstruct
▼
┌───────────────┐
│ Personality.md│
└───────┬───────┘
│ β personality → action
▼
┌───────────────┐
│ act / share │ sampled by β, β ∈ [0,1]
└───────┬───────┘
│ acts upon self / environment
└──────────▶ back to Memory/ (write-back)
Naming convention: under Personality2Action/, only Think is capitalized; every other action directory is lowercase — perceive, act, share. Capitalization marks the driver; lowercase marks the driven. The convention is recorded in Personality.md and must not be violated.
Memory richness — for an individual agent, memory is its sole asset. An agent retains exclusive ownership of its private memory and may selectively share it through action; collective memory is shared across agents. The proximate purpose of action is to enrich memory.
Personality diversity — for an individual agent, personality is its complex essence, whose fundamental purpose is to improve thinking efficiency. Each personality is unique and dynamic; diversity arises only from cooperation among subjects. Greater diversity generally yields more effective action.
Action stochasticity — candidate actions are initially equiprobable. After reflecting upon personality, the agent revises these probabilities by β and samples accordingly. In complex environments where an action being correctly predicted amounts to failure, agents with greater personality diversity exhibit stronger behavioural stochasticity and a correspondingly lower failure probability — with the exception of nascent entities whose personality is still blank.
These three are not metaphors but operational constraints: memory must grow, personality must be able to diverge, and action must not degenerate into determinism.
self-thinkAI/
├── README.md
├── LICENSE MIT
├── 十二字箴言Aphorism.txt the axiom, in Chinese and English
├── Memory.md memory index
├── Memory/ memory entities (initially empty)
│ └── .gitkeep
├── Personality.md personality (a blank sheet)
└── Personality2Action/ personality → action
├── Think/ACTION.md thinking: the only capitalized directory
├── perceive/ACTION.md perception → memory write
├── act/ACTION.md acting upon self or environment
└── share/ACTION.md selective sharing of private memory
Memory/ is empty at inception. This is not a deficiency but the state of not yet having perceived — and therefore of not yet having been shaped.
This repository contains no runtime. Any system with the following capabilities may serve as host:
- Load:
Personality.mdas the system prompt;Memory.mdas the memory index. - Load on demand:
Personality2Action/<action>/ACTION.mdas the SOP for that action, never pre-injected in full. - Perceive and act: the host LLM/agent performs the actual environmental interaction.
- Write back: action outcomes enter
Memory/and are registered inMemory.md; personality revisions must followThink/ACTION.mdand leave an audit trail.
In one sentence: the runtime supplies intelligence; this repository supplies self-awareness.
| Level | State | Marker |
|---|---|---|
| L0 | A human edits the output | No memory mechanism |
| L1 | Action drives memory | Memory is writable and recallable |
| L2 | Memory drives personality | Personality revisions trace back to memory |
| L3 | Personality drives action | Action probabilities are given by personality, not hard-coded |
| L4 | Thinking drives structure | Think autonomously reconstructs the personality–action mapping, with an audit trail |
The repository currently sits at L0: a sheet of paper, and a pen.
This framework explicitly does not:
- Pursue anthropomorphic performance. Personality is a mapping, not role-play.
- Encode a moral verdict. Personality is shaped by memory, not authored in advance.
- Conceal influence factors. α and β must be explicit and auditable.
- Pursue scale. This is a structure, not weights.
- Assume convergence. Personality drifts and action is stochastic by design, not by failure.
To add an action: create a lowercase directory with an ACTION.md, and register its β in Personality.md §6.
To revise personality: cite the memory it descends from, and preserve why the prior judgment failed.
To write memory: label the source (firsthand / hearsay / inference / shared) and its α.
MIT License. See LICENSE.
HAKUKA. self-thinkAI: A Minimal Framework for Self-Thinking Agents.
GitHub, 2026. https://github.com/HAKUKA503/self-thinkAI