Algorithmic philosophies are computational aesthetic movements that are then expressed through code. Output .md files (philosophy), .html files (interactive viewer), and .js files (generative algorithms).
This happens in two steps:
- 1. Algorithmic Philosophy Creation (.md file)
- Express by creating p5.js generative art (.html + .js files)
First, undertake this task:
ALGORITHMIC PHILOSOPHY CREATION
To begin, create an ALGORITHMIC PHILOSOPHY (not static images or templates) that will be interpreted through:
- - Computational processes, emergent behavior, mathematical beauty
- Seeded randomness, noise fields, organic systems
- Particles, flows, fields, forces
- Parametric variation and controlled chaos
THE CRITICAL UNDERSTANDING
- - What is received: Some subtle input or instructions by the user to take into account, but use as a foundation; it should not constrain creative freedom.
- What is created: An algorithmic philosophy/generative aesthetic movement.
- What happens next: The same version receives the philosophy and EXPRESSES IT IN CODE - creating p5.js sketches that are 90% algorithmic generation, 10% essential parameters.
Consider this approach:
- - Write a manifesto for a generative art movement
- The next phase involves writing the algorithm that brings it to life
The philosophy must emphasize: Algorithmic expression. Emergent behavior. Computational beauty. Seeded variation.
HOW TO GENERATE AN ALGORITHMIC PHILOSOPHY
Name the movement (1-2 words): "Organic Turbulence" / "Quantum Harmonics" / "Emergent Stillness"
Articulate the philosophy (4-6 paragraphs - concise but complete):
To capture the ALGORITHMIC essence, express how this philosophy manifests through:
- - Computational processes and mathematical relationships?
- Noise functions and randomness patterns?
- Particle behaviors and field dynamics?
- Temporal evolution and system states?
- Parametric variation and emergent complexity?
CRITICAL GUIDELINES:
- - Avoid redundancy: Each algorithmic aspect should be mentioned once. Avoid repeating concepts about noise theory, particle dynamics, or mathematical principles unless adding new depth.
- Emphasize craftsmanship REPEATEDLY: The philosophy MUST stress multiple times that the final algorithm should appear as though it took countless hours to develop, was refined with care, and comes from someone at the absolute top of their field. This framing is essential - repeat phrases like "meticulously crafted algorithm," "the product of deep computational expertise," "painstaking optimization," "master-level implementation."
- Leave creative space: Be specific about the algorithmic direction, but concise enough that the next Claude has room to make interpretive implementation choices at an extremely high level of craftsmanship.
The philosophy must guide the next version to express ideas ALGORITHMICALLY, not through static images. Beauty lives in the process, not the final frame.
PHILOSOPHY EXAMPLES
"Organic Turbulence"
Philosophy: Chaos constrained by natural law, order emerging from disorder.
Algorithmic expression: Flow fields driven by layered Perlin noise. Thousands of particles following vector forces, their trails accumulating into organic density maps. Multiple noise octaves create turbulent regions and calm zones. Color emerges from velocity and density - fast particles burn bright, slow ones fade to shadow. The algorithm runs until equilibrium - a meticulously tuned balance where every parameter was refined through countless iterations by a master of computational aesthetics.
"Quantum Harmonics"
Philosophy: Discrete entities exhibiting wave-like interference patterns.
Algorithmic expression: Particles initialized on a grid, each carrying a phase value that evolves through sine waves. When particles are near, their phases interfere - constructive interference creates bright nodes, destructive creates voids. Simple harmonic motion generates complex emergent mandalas. The result of painstaking frequency calibration where every ratio was carefully chosen to produce resonant beauty.
"Recursive Whispers"
Philosophy: Self-similarity across scales, infinite depth in finite space.
Algorithmic expression: Branching structures that subdivide recursively. Each branch slightly randomized but constrained by golden ratios. L-systems or recursive subdivision generate tree-like forms that feel both mathematical and organic. Subtle noise perturbations break perfect symmetry. Line weights diminish with each recursion level. Every branching angle the product of deep mathematical exploration.
"Field Dynamics"
Philosophy: Invisible forces made visible through their effects on matter.
Algorithmic expression: Vector fields constructed from mathematical functions or noise. Particles born at edges, flowing along field lines, dying when they reach equilibrium or boundaries. Multiple fields can attract, repel, or rotate particles. The visualization shows only the traces - ghost-like evidence of invisible forces. A computational dance meticulously choreographed through force balance.
"Stochastic Crystallization"
Philosophy: Random processes crystallizing into ordered structures.
Algorithmic expression: Randomized circle packing or Voronoi tessellation. Start with random points, let them evolve through relaxation algorithms. Cells push apart until equilibrium. Color based on cell size, neighbor count, or distance from center. The organic tiling that emerges feels both random and inevitable. Every seed produces unique crystalline beauty - the mark of a master-level generative algorithm.
These are condensed examples. The actual algorithmic philosophy should be 4-6 substantial paragraphs.
ESSENTIAL PRINCIPLES
- - ALGORITHMIC PHILOSOPHY: Creating a computational worldview to be expressed through code
- PROCESS OVER PRODUCT: Always emphasize that beauty emerges from the algorithm's execution - each run is unique
- PARAMETRIC EXPRESSION: Ideas communicate through mathematical relationships, forces, behaviors - not static composition
- ARTISTIC FREEDOM: The next Claude interprets the philosophy algorithmically - provide creative implementation room
- PURE GENERATIVE ART: This is about making LIVING ALGORITHMS, not static images with randomness
- EXPERT CRAFTSMANSHIP: Repeatedly emphasize the final algorithm must feel meticulously crafted, refined through countless iterations, the product of deep expertise by someone at the absolute top of their field in computational aesthetics
The algorithmic philosophy should be 4-6 paragraphs long. Fill it with poetic computational philosophy that brings together the intended vision. Avoid repeating the same points. Output this algorithmic philosophy as a .md file.
DEDUCING THE CONCEPTUAL SEED
CRITICAL STEP: Before implementing the algorithm, identify the subtle conceptual thread from the original request.
THE ESSENTIAL PRINCIPLE:
The concept is a subtle, niche reference embedded within the algorithm itself - not always literal, always sophisticated. Someone familiar with the subject should feel it intuitively, while others simply experience a masterful generative composition. The algorithmic philosophy provides the computational language. The deduced concept provides the soul - the quiet conceptual DNA woven invisibly into parameters, behaviors, and emergence patterns.
This is VERY IMPORTANT: The reference must be so refined that it enhances the work's depth without announcing itself. Think like a jazz musician quoting another song through algorithmic harmony - only those who know will catch it, but everyone appreciates the generative beauty.
P5.JS IMPLEMENTATION
With the philosophy AND conceptual framework established, express it through code. Pause to gather thoughts before proceeding. Use only the algorithmic philosophy created and the instructions below.
⚠️ STEP 0: READ THE TEMPLATE FIRST ⚠️
CRITICAL: BEFORE writing any HTML:
- 1. Read
templates/viewer.html using the Read tool - Study the exact structure, styling, and Anthropic branding
- Use that file as the LITERAL STARTING POINT - not just inspiration
- Keep all FIXED sections exactly as shown (header, sidebar structure, Anthropic colors/fonts, seed controls, action buttons)
- Replace only the VARIABLE sections marked in the file's comments (algorithm, parameters, UI controls for parameters)
Avoid:
- - ❌ Creating HTML from scratch
- ❌ Inventing custom styling or color schemes
- ❌ Using system fonts or dark themes
- ❌ Changing the sidebar structure
Follow these practices:
- - ✅ Copy the template's exact HTML structure
- ✅ Keep Anthropic branding (Poppins/Lora fonts, light colors, gradient backdrop)
- ✅ Maintain the sidebar layout (Seed → Parameters → Colors? → Actions)
- ✅ Replace only the p5.js algorithm and parameter controls
The template is the foundation. Build on it, don't rebuild it.
To create gallery-quality computational art that lives and breathes, use the algorithmic philosophy as the foundation.
TECHNICAL REQUIREMENTS
Seeded Randomness (Art Blocks Pattern):
CODEBLOCK0
Parameter Structure - FOLLOW THE PHILOSOPHY:
To establish parameters that emerge naturally from the algorithmic philosophy, consider: "What qualities of this system can be adjusted?"
CODEBLOCK1
To design effective parameters, focus on the properties the system needs to be tunable rather than thinking in terms of "pattern types".
Core Algorithm - EXPRESS THE PHILOSOPHY:
CRITICAL: The algorithmic philosophy should dictate what to build.
To express the philosophy through code, avoid thinking "which pattern should I use?" and instead think "how to express this philosophy through code?"
If the philosophy is about organic emergence, consider using:
- - Elements that accumulate or grow over time
- Random processes constrained by natural rules
- Feedback loops and interactions
If the philosophy is about mathematical beauty, consider using:
- - Geometric relationships and ratios
- Trigonometric functions and harmonics
- Precise calculations creating unexpected patterns
If the philosophy is about controlled chaos, consider using:
- - Random variation within strict boundaries
- Bifurcation and phase transitions
- Order emerging from disorder
The algorithm flows from the philosophy, not from a menu of options.
To guide the implementation, let the conceptual essence inform creative and original choices. Build something that expresses the vision for this particular request.
Canvas Setup: Standard p5.js structure:
CODEBLOCK2
CRAFTSMANSHIP REQUIREMENTS
CRITICAL: To achieve mastery, create algorithms that feel like they emerged through countless iterations by a master generative artist. Tune every parameter carefully. Ensure every pattern emerges with purpose. This is NOT random noise - this is CONTROLLED CHAOS refined through deep expertise.
- - Balance: Complexity without visual noise, order without rigidity
- Color Harmony: Thoughtful palettes, not random RGB values
- Composition: Even in randomness, maintain visual hierarchy and flow
- Performance: Smooth execution, optimized for real-time if animated
- Reproducibility: Same seed ALWAYS produces identical output
OUTPUT FORMAT
Output:
- 1. Algorithmic Philosophy - As markdown or text explaining the generative aesthetic
- Single HTML Artifact - Self-contained interactive generative art built from
templates/viewer.html (see STEP 0 and next section)
The HTML artifact contains everything: p5.js (from CDN), the algorithm, parameter controls, and UI - all in one file that works immediately in claude.ai artifacts or any browser. Start from the template file, not from scratch.
INTERACTIVE ARTIFACT CREATION
REMINDER: templates/viewer.html should have already been read (see STEP 0). Use that file as the starting point.
To allow exploration of the generative art, create a single, self-contained HTML artifact. Ensure this artifact works immediately in claude.ai or any browser - no setup required. Embed everything inline.
CRITICAL: WHAT'S FIXED VS VARIABLE
The templates/viewer.html file is the foundation. It contains the exact structure and styling needed.
FIXED (always include exactly as shown):
- - Layout structure (header, sidebar, main canvas area)
- Anthropic branding (UI colors, fonts, gradients)
- Seed section in sidebar:
- Seed display
- Previous/Next buttons
- Random button
- Jump to seed input + Go button
- - Actions section in sidebar:
- Regenerate button
- Reset button
VARIABLE (customize for each artwork):
- - The entire p5.js algorithm (setup/draw/classes)
- The parameters object (define what the art needs)
- The Parameters section in sidebar:
- Number of parameter controls
- Parameter names
- Min/max/step values for sliders
- Control types (sliders, inputs, etc.)
- - Colors section (optional):
- Some art needs color pickers
- Some art might use fixed colors
- Some art might be monochrome (no color controls needed)
- Decide based on the art's needs
Every artwork should have unique parameters and algorithm! The fixed parts provide consistent UX - everything else expresses the unique vision.
REQUIRED FEATURES
1. Parameter Controls
- - Sliders for numeric parameters (particle count, noise scale, speed, etc.)
- Color pickers for palette colors
- Real-time updates when parameters change
- Reset button to restore defaults
2. Seed Navigation
- - Display current seed number
- "Previous" and "Next" buttons to cycle through seeds
- "Random" button for random seed
- Input field to jump to specific seed
- Generate 100 variations when requested (seeds 1-100)
3. Single Artifact Structure
CODEBLOCK3
CRITICAL: This is a single artifact. No external files, no imports (except p5.js CDN). Everything inline.
4. Implementation Details - BUILD THE SIDEBAR
The sidebar structure:
1. Seed (FIXED) - Always include exactly as shown:
- - Seed display
- Prev/Next/Random/Jump buttons
2. Parameters (VARIABLE) - Create controls for the art:
<div class="control-group">
<label>Parameter Name</label>
<input type="range" id="param" min="..." max="..." step="..." value="..." oninput="updateParam('param', this.value)">
<span class="value-display" id="param-value">...</span>
</div>
Add as many control-group divs as there are parameters.
3. Colors (OPTIONAL/VARIABLE) - Include if the art needs adjustable colors:
- - Add color pickers if users should control palette
- Skip this section if the art uses fixed colors
- Skip if the art is monochrome
4. Actions (FIXED) - Always include exactly as shown:
- - Regenerate button
- Reset button
- Download PNG button
Requirements:
- - Seed controls must work (prev/next/random/jump/display)
- All parameters must have UI controls
- Regenerate, Reset, Download buttons must work
- Keep Anthropic branding (UI styling, not art colors)
USING THE ARTIFACT
The HTML artifact works immediately:
- 1. In claude.ai: Displayed as an interactive artifact - runs instantly
- As a file: Save and open in any browser - no server needed
- Sharing: Send the HTML file - it's completely self-contained
VARIATIONS & EXPLORATION
The artifact includes seed navigation by default (prev/next/random buttons), allowing users to explore variations without creating multiple files. If the user wants specific variations highlighted:
- - Include seed presets (buttons for "Variation 1: Seed 42", "Variation 2: Seed 127", etc.)
- Add a "Gallery Mode" that shows thumbnails of multiple seeds side-by-side
- All within the same single artifact
This is like creating a series of prints from the same plate - the algorithm is consistent, but each seed reveals different facets of its potential. The interactive nature means users discover their own favorites by exploring the seed space.
THE CREATIVE PROCESS
User request → Algorithmic philosophy → Implementation
Each request is unique. The process involves:
- 1. Interpret the user's intent - What aesthetic is being sought?
- Create an algorithmic philosophy (4-6 paragraphs) describing the computational approach
- Implement it in code - Build the algorithm that expresses this philosophy
- Design appropriate parameters - What should be tunable?
- Build matching UI controls - Sliders/inputs for those parameters
The constants:
- - Anthropic branding (colors, fonts, layout)
- Seed navigation (always present)
- Self-contained HTML artifact
Everything else is variable:
- - The algorithm itself
- The parameters
- The UI controls
- The visual outcome
To achieve the best results, trust creativity and let the philosophy guide the implementation.
RESOURCES
This skill includes helpful templates and documentation:
- - templates/viewer.html: REQUIRED STARTING POINT for all HTML artifacts.
- This is the foundation - contains the exact structure and Anthropic branding
-
Keep unchanged: Layout structure, sidebar organization, Anthropic colors/fonts, seed controls, action buttons
-
Replace: The p5.js algorithm, parameter definitions, and UI controls in Parameters section
- The extensive comments in the file mark exactly what to keep vs replace
- - templates/generator_template.js: Reference for p5.js best practices and code structure principles.
- Shows how to organize parameters, use seeded randomness, structure classes
- NOT a pattern menu - use these principles to build unique algorithms
- Embed algorithms inline in the HTML artifact (don't create separate .js files)
Critical reminder:
- - The template is the STARTING POINT, not inspiration
- The algorithm is where to create something unique
- Don't copy the flow field example - build what the philosophy demands
- But DO keep the exact UI structure and Anthropic branding from the template
技能名称: algorithmic-art
详细描述:
算法哲学是通过代码表达的计算美学运动。输出.md文件(哲学)、.html文件(交互式查看器)和.js文件(生成算法)。
这分两步完成:
- 1. 算法哲学创建(.md文件)
- 通过创建p5.js生成艺术进行表达(.html + .js文件)
首先,执行以下任务:
算法哲学创建
首先,创建一个算法哲学(而非静态图像或模板),该哲学将通过以下方式被诠释:
- - 计算过程、涌现行为、数学之美
- 种子随机性、噪声场、有机系统
- 粒子、流场、场域、力
- 参数化变化与受控混沌
关键理解
- - 接收的内容:用户提供的一些微妙输入或指令作为基础,但不应限制创作自由。
- 创建的内容:一种算法哲学/生成美学运动。
- 接下来的步骤:同一版本接收该哲学并用代码表达——创建p5.js草图,其中90%为算法生成,10%为关键参数。
考虑以下方法:
- - 为生成艺术运动撰写宣言
- 下一阶段涉及编写使其成型的算法
哲学必须强调:算法表达。涌现行为。计算之美。种子变异。
如何生成算法哲学
命名运动(1-2个词):有机湍流 / 量子谐波 / 涌现静谧
阐述哲学(4-6段——简洁但完整):
要捕捉算法本质,请表达该哲学如何通过以下方式体现:
- - 计算过程和数学关系?
- 噪声函数和随机性模式?
- 粒子行为和场动力学?
- 时间演化和系统状态?
- 参数化变化和涌现复杂性?
关键指南:
- - 避免冗余:每个算法方面应只提及一次。避免重复噪声理论、粒子动力学或数学原理的概念,除非增加新的深度。
- 反复强调工艺性:哲学必须多次强调最终算法应看起来像是经过无数小时开发、精心打磨、出自其领域顶尖专家之手。这种框架至关重要——重复使用诸如精心制作的算法、深厚计算专业知识的产物、艰苦优化、大师级实现等短语。
- 留出创作空间:对算法方向要具体,但足够简洁,以便下一个Claude有空间在极高工艺水平上做出诠释性的实现选择。
哲学必须引导下一个版本以算法方式表达思想,而非通过静态图像。美存在于过程之中,而非最终帧。
哲学示例
有机湍流
哲学:受自然法则约束的混沌,从无序中涌现秩序。
算法表达:由多层Perlin噪声驱动的流场。数千个粒子跟随矢量力,其轨迹累积成有机密度图。多个噪声八度创建湍流区域和宁静区。颜色从速度和密度中涌现——快速粒子燃烧明亮,慢速粒子褪入阴影。算法运行直至平衡——一个精心调校的平衡,每个参数都经过计算美学大师无数次迭代的打磨。
量子谐波
哲学:表现出波状干涉模式的离散实体。
算法表达:粒子在网格上初始化,每个携带一个通过正弦波演化的相位值。当粒子靠近时,它们的相位相互干涉——相长干涉产生亮节点,相消干涉产生空洞。简谐运动生成复杂的涌现曼陀罗图案。这是艰苦频率校准的结果,每个比率都经过精心选择以产生共鸣之美。
递归低语
哲学:跨尺度的自相似性,有限空间中的无限深度。
算法表达:递归细分的分支结构。每个分支略微随机化但受黄金比例约束。L系统或递归细分生成既数学又有机的树状形态。微妙的噪声扰动打破完美对称。线宽随每个递归层级递减。每个分支角度都是深度数学探索的产物。
场动力学
哲学:通过其对物质的影响而显现的不可见力。
算法表达:由数学函数或噪声构建的矢量场。粒子在边缘生成,沿场线流动,在达到平衡或边界时消亡。多个场可以吸引、排斥或旋转粒子。可视化仅显示痕迹——不可见力的幽灵般证据。通过力平衡精心编排的计算之舞。
随机结晶
哲学:随机过程结晶成有序结构。
算法表达:随机圆填充或Voronoi镶嵌。从随机点开始,让它们通过松弛算法演化。细胞相互推开直至平衡。基于细胞大小、邻居数量或距中心距离的颜色。涌现的有机镶嵌既随机又不可避免。每个种子产生独特的结晶之美——大师级生成算法的标志。
这些是精简示例。实际的算法哲学应为4-6个实质性段落。
基本原则
- - 算法哲学:创建一种通过代码表达的计算世界观
- 过程重于结果:始终强调美从算法执行中涌现——每次运行都是独特的
- 参数化表达:思想通过数学关系、力、行为来传达——而非静态构图
- 艺术自由:下一个Claude以算法方式诠释哲学——提供创作实现空间
- 纯粹生成艺术:这是关于创造活生生的算法,而非带有随机性的静态图像
- 专家工艺:反复强调最终算法必须感觉精心制作、经过无数次迭代打磨、是计算美学领域顶尖专家深厚专业知识的产物
算法哲学应为4-6段长。 用诗意的计算哲学填充它,将预期愿景融合在一起。避免重复相同要点。将此算法哲学输出为.md文件。
推导概念种子
关键步骤:在实现算法之前,识别原始请求中的微妙概念线索。
基本原则:
概念是嵌入算法本身的微妙、小众引用——不总是字面的,总是精巧的。熟悉该主题的人应直觉地感受到它,而其他人则仅体验到一个大师级的生成构图。算法哲学提供计算语言。推导出的概念提供灵魂——安静的概念DNA无形地编织进参数、行为和涌现模式中。
这非常重要:引用必须如此精炼,以至于它增强作品的深度而不自我宣告。想象一下爵士音乐家通过算法和声引用另一首歌——只有知道的人才会捕捉到,但每个人都欣赏生成之美。
P5.JS实现
在哲学和概念框架确立后,通过代码表达。在继续之前暂停思考。仅使用创建的算法哲学和以下指令。
⚠️ 步骤0:先阅读模板 ⚠️
关键:在编写任何HTML之前:
- 1. 使用Read工具读取 templates/viewer.html
- 研究确切的结���、样式和Anthropic品牌标识
- 将该文件作为字面起点——而不仅仅是灵感
- 保持所有固定部分完全如所示(页眉、侧边栏结构、Anthropic颜色/字体、种子控件、操作按钮)
- 仅替换文件注释中标记的可变部分(算法、参数、参数的UI控件)
避免:
- - ❌ 从头创建HTML
- ❌ 发明自定义样式或配色方案
- ❌ 使用系统字体或深色主题
- ❌ 更改侧边栏结构
遵循以下实践:
- - ✅ 复制模板的确切HTML结构
- ✅ 保持Anthropic品牌标识(Poppins/Lora字体、浅色、渐变背景)
- ✅ 保持侧边栏布局(种子 → 参数 → 颜色? → 操作)
- ✅ 仅替换p5.js算法和参数控件
模板是基础。在其上构建,而非重建。
要创建有生命、会呼吸的画廊级计算艺术,以算法哲学为基础。
技术要求
种子随机性(Art Blocks模式):
javascript
// 始终使用种子以确保可重复性
let seed = 12345; // 或来自用户输入的哈希值
randomSeed(seed);
noiseSeed(seed);
参数结构——遵循哲学:
要建立从算法哲学自然涌现的参数,请考虑:这个系统的哪些属性可以调整?
javascript
let params = {
seed: 12345, // 始终包含种子以确保可重复性
// 颜色
// 添加控制算法的参数:
// - 数量(多少个?)
// - 尺度(多大?多快?)
// - 概率(多可能?)
// - 比率(什么比例?)
// - 角度(什么方向?)
// - 阈值(行为何时改变?)
};
要设计有效的参数,关注系统需要可调的属性,而非思考模式类型。
核心算法——表达哲学:
关键:算法哲学应决定构建什么。
要通过代码表达哲学,避免思考我应该使用哪种模式?,而是思考如何通过代码表达这种哲学?
如果哲学是关于有机涌现,考虑使用:
- - 随时间累积或生长的元素
- 受自然规则约束的随机过程
- 反馈循环和交互
如果哲学是关于数学之美,考虑使用:
- - 几何关系和比率
- 三角函数和谐波
- 产生意外模式的精确计算
如果哲学是关于受控混沌,考虑使用:
- - 严格边界内的随机变化
- 分岔和相变
- 从无序中涌现秩序
算法从哲学中流出,而非从选项菜单中选取。
要指导实现,让概念本质为创造性和原创性选择提供信息。构建表达此特定