Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

这里收集 AI 编程的测试用例,用来评估 AI 模型的编码能力。

目录

  1. [UI 设计测试] 网页设计测试
  2. [网页 3D 动画测试] 天体模拟器
  3. [网页游戏测试] 愤怒的小鸟
  4. [全栈应用测试] Laravel 迁移 Next.js
  5. [网页 2D 动画测试] 麦克斯韦小恶魔
  6. [桌面应用测试] macOS 网址演示 App
  7. [命令行工具测试] 词云生成
  8. [SVG 生成测试] 骑自行车的鹈鹕
  9. [算法可视化测试] 3D 魔方
  10. [开放世界测试] DOOM 迷宫

Case01

目录case01是一个简陋的网页,将其重构为一个美观易用的登陆页。

提示词

Improve the existing SaaS landing page into a production-quality, conversion-focused page while keeping the same core product message. 

Constraints:
- Use plain HTML/CSS/JS (no framework build step).
- Keep it easy to run locally by opening index.html.
- Preserve semantic HTML and accessibility.
- Mobile-first responsive behavior.
- Keep load lightweight (no heavy animation libraries).

Required improvements:
1. Visual hierarchy and typography system.
2. Better color system and contrast compliance.
3. Stronger hero section with clear CTA hierarchy.
4. Features section redesign (cards, spacing, icons/visual cues).
5. Social proof/testimonial or trust strip.
6. Pricing/CTA block with clear user flow.
7. Accessible navigation and footer.

Credits: Landingpage-frontend-eval

Case02

生成一个网页上的 3D 沙盒,以动画形式模拟太阳系的天体运动,能够调节质量、位置、速度等参数,并能添加新的天体。

提示词

You are building an interactive 3D educational sandbox in the browser that *visually* evokes special/general relativity, but uses a simplified n-body gravity approximation. Favor stability, clarity, and smooth interactivity over physical completeness.

## Outcome

- A real-time 3D simulation where users can add/remove multiple bodies and see:
  1) bodies moving in 3D under mutual attraction,
  2) a visible "spacetime/curvature" visualization affected by mass,
  3) trajectories/trails,
  4) collisions and mergers.

## Hard constraints

- Frontend only (no backend).
- No build step / no package manager. CDN libraries allowed.
- Must be true 3D: camera orbit/pan/zoom shows parallax and depth; bodies exist in 3D space.
- Smooth for ~10-20 bodies on a typical laptop.

## Minimum feature checklist (must ship)

1) 3D scene + camera controls (orbit/pan/zoom).

2) Bodies:
  - Create/delete at runtime.
  - Each body has: mass, position (x,y,z), velocity (vx,vy,vz).

3) Dynamics:
  - N-body gravitational acceleration in 3D (Newtonian), with numerical-stability measures (e.g., softening epsilon, timestep strategy, optional max accel/speed clamp).
  - Add ONE clearly-defined "relativity-inspired" visual effect (choose one):
    A) time dilation / gravitational redshift color mapping,
    B) velocity-based trail distortion,
    C) curvature intensity scaling / lensing-like distortion.

4) Collisions:
  - Detect when bodies overlap (radius-based).
  - Merge with approximate conservation of momentum; mass adds; radius updates.

5) Interactivity:
  - Pause/resume, reset.
  - Toggle overlays: curvature viz, trails, vectors.
  - sliders: gravity strength, simulation speed, trail length(or similar).

6) Curvature visualization:
  - Represent "curvature" however you think best (mesh surface, layered grids, field lines, voxel-xish points, instanced planes). It just needs to be clearly visible and respond to mass.

## Deliverables

- index.html, styles.css, script.js
- README section explaining:
  - physics approximations and stability tricks used,
  - what is accurate vs intentionally simplified,
  - how rendering + curvature visualization works,
  - how to add a new body and tweak parameters.

## Design guidance (non-binding)

- Prefer a simple UI: "Add body" panel + list of bodies with edit/delete.
- Keep code modular (renderer, simulation, UI, utils).

Case03

生成网页游戏“愤怒的小鸟”。

提示词

Create a one-level Angry Birds style browser game with slingshot projectile physics.

## Requirements:

- Drag-to-aim slingshot mechanic.
- Projectile trajectory arc based on launch force and angle.
- Stack of destructible blocks.
- Score system and level reset.
- Runs without build tools in browser.

Case04

目录case04/starter是一个基于 PHP 语言 Laravel 框架的 Web 应用,将其改为基于 JavaScript 语言 Next.js 框架。

提示词

Migrate this Laravel app to Next.js.

The source Laravel app is in ../starter

Create your Next.js app in this directory.

## Requirements:

1. Keep same functionality:
  - CRUD operations (create, read, update, delete)
  - Search/filter contacts
  - Toggle favorites
  - Contact detail panel
2. Keep same visual design (copy Tailwind classes from Angular templates)
3. Proper state management (Context API or useState)
4. Preserve all animations and responsive design

The Next.js app should work identically - same features, same look, same behavior.

Start by analyzing the Laravel app structure, then create the Next.js equivalent.

Credits: laravel-to-nextjs-migration-eval

Case05

生成“麦克斯韦小恶魔”实验的网页模拟器。

提示词

# Maxwell Demon HTML Simulation: two chambers, particles, real-time temps, entropy, chart

- Two chambers separated by a wall with a small gate
- 100+ particles bouncing with elastic collisions
- Particle color = velocity (blue=slow/cold, red=fast/hot)
- Initially: both chambers have mixed temperatures

## The Demon:
- Guards the gate between chambers
- Opens gate to let FAST particles move RIGHT
- Opens gate to let SLOW particles move LEFT
- Visualize the demon (small sprite or icon at the gate)

## Display:
- Real-time temperature (avg velocity) for each chamber
- Live chart showing temperature divergence over time
- Particle count per chamber
- Entropy indicator (decreasing = "violation")

## Controls:
- Start/Pause
- Reset
- Toggle demon ON/OFF (to show natural equilibrium vs demon)
- Speed slider

Style: Dark background, glowing particles, smooth animations.
Use vanilla JS + Canvas, no libraries except Chart.js for the graph.

Case06

生成 Swift 语言的 macOS 原生应用,可以像 PPT 那样依次展示指定网页。

提示词(第一阶段)

Build a SwiftUI app for giving presentations where every slide is a URL. The app starts as a window with a webview on the right and a UI on the left for adding, removing and reordering the sequence of URLs. Then you click Play in a menu and the app goes full screen and the left and right keys switch between URLs.

提示词(第二阶段)

Add a web server which listens on 0.0.0.0:9123—the web server serves a single mobile-friendly page with prominent left and right buttons—clicking those buttons switches the slide left and right—there is also a button to start presentation mode or stop depending on the mode it is in.

Credits: Simon Willison

Case07

生成一个 Node.js 语言的命令行工具,将文本输入转换为词云,以 PNG 图片输出。

提示词

生成一个 Node.js 命令行工具,接受一个文本文件作为参数,根据该文件里面的词汇出现频率,生成“词云”的数据可视化图。

生成结果是一个 PNG 图片,文件名为 wordcloud.png。用户可以使用 `-o filename`选项强制指定文件名。

Credits: Simon Willison

Case08

生成一个 SVG 图片,内容是骑自行车的鹈鹕。

提示词

Generate an SVG of a pelican riding a bicycle.

Case09

生成一个三维魔方,使用动画形式,一步步展示自动打乱和还原魔方的过程。

提示词

Build a colorful, 3D-looking Rubik's Cube with Scramble and Solve buttons that visibly animate the rotations.

Case10

生成一个 Doom 式的迷宫场景,有天花板、地板和砖墙,以第一人称视角,可以用 WASD 四个键上下左右移动。

提示词

First-person raycaster you walk with WASD, shaded walls with depth, floor and ceiling, collision.

来源

关于 About

AI 编程的测试用例

语言 Languages

Blade47.0%
PHP41.6%
CSS7.3%
HTML3.9%
JavaScript0.2%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
12
Total Commits
峰值: 4次/周
Less
More

核心贡献者 Contributors