[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-primaryobjects--AI-Programmer":3,"tool-primaryobjects--AI-Programmer":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":75,"owner_website":82,"owner_url":83,"languages":84,"stars":89,"forks":90,"last_commit_at":91,"license":81,"difficulty_score":23,"env_os":92,"env_gpu":93,"env_ram":93,"env_deps":94,"category_tags":98,"github_topics":99,"view_count":10,"oss_zip_url":81,"oss_zip_packed_at":81,"status":16,"created_at":110,"updated_at":111,"faqs":112,"releases":141},603,"primaryobjects\u002FAI-Programmer","AI-Programmer","Using artificial intelligence and genetic algorithms to automatically write programs. Tutorial: http:\u002F\u002Fwww.primaryobjects.com\u002Fcms\u002Farticle149","AI-Programmer 是一个利用人工智能与遗传算法自动编写程序的开源实验项目。它致力于探索计算机自主生成代码的潜力，试图解决特定计算任务的自动化编程问题，比如让机器自行写出输出“你好世界”或计算斐波那契数列的代码。\n\nAI-Programmer 主要面向对 AI 编程、进化算法感兴趣的研究人员及技术开发者。虽然目前仍处于概念验证阶段，但它已成功生成包括字符串反转、加减法在内的多种基础程序，展现了惊人的进化能力。\n\n其独特之处在于底层采用了一种仅含 8 条指令却具备图灵完备性的编程语言，便于构建解释器并在模拟环境中运行生成的代码。系统通过计算程序输出的适应度评分来评估质量，再利用选择、交叉和变异机制迭代优化基因组，直至达成目标。这种自我修改与改进代码的机制，为理解 AI 如何创造软件提供了极具价值的参考视角。","AI-Programmer\n=========\n\nRead the full article [Using Artificial Intelligence to Write Self-Modifying\u002FImproving Programs](http:\u002F\u002Fwww.primaryobjects.com\u002F2013\u002F01\u002F27\u002Fusing-artificial-intelligence-to-write-self-modifying-improving-programs\u002F)\n\nRead the research paper [AI Programmer: Autonomously Creating\nSoftware Programs Using Genetic Algorithms](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1709.05703.pdf \"AI Programmer: Autonomously Creating\nSoftware Programs Using Genetic Algorithms\").\n\nAI-Programmer is an experiment with using artificial intelligence and genetic algorithms to automatically generate programs. Successfully created [programs](https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Ftree\u002Fmaster\u002FResults) by the AI include: hello world, hello \u003Cname>, addition, subtraction, reversing a string, fibonnaci sequence, 99 bottles of beer on the wall, and more. It's getting smarter. In short, it's an AI genetic algorithm implementation with self modifying code.\n\n## Motivation\n\nIs it possible for a computer to write its own programs? Need a word processor? Let the computer create one for you. Need a screen capture tool? Let the computer create one for you. Take it a step further, and let the computer create programs that simplify your life, that you didn't even know you needed!\n\nThis is the idea behind the AI-Programmer experiment. The goal is to ultimately create a computer program that can write its own computer programs to solve specific computational problems. While the capability of a computer deciding what type of program to write is beyond our current means, we can still have a computer generate programs to solve very specific tasks, such as outputting the text, \"Hello World\". AI Programmer uses an esoteric programming language for generating software programs.\n\n## Details\n\nThe underlying programming language consists of only 8 instructions, while being Turing complete. Theoretically, it is capable of solving any computational problem. This makes it easy to develop an interpreter, capable of running the AI-generated programs in a simulated environment. In this manner, each generated program may be executed and its performance ranked as a fitness score. Since the AI is using a Turing complete programming language, the AI itself, is also theoretically capable of solving any computational problem. However, for this experiment, the AI will focus on outputting a simple string to the console.\n\n## How It Works\n\nAI-Programmer works as follows:\n\n- A genome consists of an array of doubles.\n- Each gene corresponds to an instruction in the programming language.\n- Start with a population of random genomes.\n- Decode each genome into a resulting program by converting each double into its corresponding instruction and execute the program.\n- Get each program's fitness score, based upon the output it writes to the console (if any), and rank them.\n- Mate the best genomes together using roulette selection, crossover, and mutation to produce a new generation.\n- Repeat the process with the new generation until the target fitness score is achieved.\n\n## The Fitness Method\n\nThe fitness method works by scoring the output of the generated program. The score is calculated by looking at each character output by the program and subtracting its value from the desired character:\n\n```\nfitness += 256 - Math.Abs(console[i] - targetString[i]);\n```\n\n## Interpreter Instruction Set\n\n```\n> \tIncrement the pointer.\n\u003C \tDecrement the pointer.\n+ \tIncrement the byte at the pointer.\n- \tDecrement the byte at the pointer.\n. \tOutput the byte at the pointer.\n, \tInput a byte and store it in the byte at the pointer.\n[ \tJump forward past the matching ] if the byte at the pointer is zero.\n] \tJump backward to the matching [ unless the byte at the pointer is zero.\n```\n\n## Results?\n\nKeep in mind, this is a proof of concept. So far, the program has successfully written several programs in its target programming language. You can view screenshots of all the results in the [\u002FResults](https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Ftree\u002Fmaster\u002FResults) folder. These tests were ran on an Intel Core 2 Quad 2.5GHz.\n\n## hi\n\nThe AI successfully wrote a program to output \"hi\" after 5,700 generations in about 1 minute. It produced the following code:\n\n```\n+[+++++-+>++>++-++++++\u003C\u003C]>++.[+.]-.,-#>>]\u003C]\n```\n\nWhile the above code contains parsing errors, such as non-matching brackets, our simulation interpreter computes the result up until the program fails, so in the above case, the syntax error (which is later on in the code, after a solution is found) doesn't impact the fitness.\n\nYou can try pasting the above code into an online [interpreter](http:\u002F\u002Fwww.iamcal.com\u002Fmisc\u002Fbf_debug\u002F). Click \"Start Debugger\", ignore the warnings, then click Run To Breakpoint. Note the output.\n\nIf we trim off the excess code, we see the following syntactically-valid code:\n\n```\n+[+++++-+>++>++-++++++\u003C\u003C]>++.[+.]\n```\n\n## hello\n\nThe AI successfully wrote a program to output \"hello\" after 252,0000 generations in about 29 minutes. It produced the following code:\n\n```\n+-+-+>-\u003C[++++>+++++\u003C+\u003C>++]>[-[---.--[[-.++++[+++..].+]],]\u003C-+\u003C+,.+>[[.,],+\u003C.+-\u003C,--+.]],+][[[.+.,,+].-\n```\n\nDuring the generation process, the AI came pretty close to a solution, but a couple letters were bound to each other, within a loop. The AI was able to overcome this by creating an inner-loop, within the problematic one, that successfully output the correct character, and continued processing.\n\n## Hi!\n\nIn another example, the AI successfully wrote a program to output \"Hi!\" after 1,219,400 generations in about 2 hours and 7 minutes. It produced the following code:\n\n```\n>-----------\u003C++[[++>++\u003C+][]>-.+[+++++++++++++++++++++++++++++>\u003C+++.\u003C>\u003C-->>>+].]\n```\n\n## I love all humans\n\nThe AI successfully wrote a program to output \"I love all humans\" after 6,057,200 generations in about 10 hours. It produced the following code:\n\n```\n+[>+\u003C+++]+>------------.+\u003C+++++++++++++++++++++++++++++++.>++++++++++++++++++++++++++++++++++.+++.+++++++.-----------------.--\u003C.>--.+++++++++++..---\u003C.>-.+++++++++++++.--------.------------.+++++++++++++.+++++.\n```\n\nMore complex programs could likely be generated while using faster PCs. Next steps include attempting to accept user input and process results.\n\n## Quick-Start Guide to Using the Code\n\nCompatible with both Visual Studio and VS Code.\n\n- Clone the `master` branch and open with [Visual Studio](https:\u002F\u002Fvisualstudio.microsoft.com\u002Fvs\u002Fcommunity\u002F).\n- Clone the [vscode-net90](https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Ftree\u002Fvscode-net90) branch and open with VS Code and .NET 9.0.\n\n### Using the Code\n\nBy default, the code is configured to use the Classic instruction set and to write a program to output a string. To change the string that is generated, simply expand the \"Private Variables\" section and change the text for TargetString to your desired value.\n\n```\nprivate static TargetParams _targetParams = new TargetParams { TargetString = \"hello world\" };\n```\n\nTo change the type of program that the AI writes, change the fitness method inside GetFitnessMethod().\n\n```\nprivate static IFitness GetFitnessMethod()\n{\n\treturn new StringStrictFitness(_ga, _maxIterationCount, _targetParams.TargetString, _appendCode);\n}\n```\n\nYou can change this to any class within the AI.Programmer.Fitness\u002FConcrete project. Examples:\n\n```\nreturn new StringStrictFitness(_ga, _maxIterationCount, _targetParams.TargetString, _appendCode);\nreturn new AddFitness(_ga, _maxIterationCount);\nreturn new SubtractFitness(_ga, _maxIterationCount);\nreturn new ReverseStringFitness(_ga, _maxIterationCount);\nreturn new HelloUserFitness(_ga, _maxIterationCount, _targetString);\n```\n\nTo use sub-routines, you'll need to enable functions. This will let the AI produce programs much faster. Uncomment the code for the functionGenerator, as follows:\n\n```\nprivate static IFunction _functionGenerator = new StringFunction(() => GetFitnessMethod(), _bestStatus, fitnessFunction, OnGeneration, _crossoverRate, _mutationRate, _genomeSize, _targetParams);\n```\n\nSet the App.config to use BrainPlus, so the AI has access to sub-routine instructions:\n\n```\n\u003CappSettings>\n\t\u003Cadd key=\"BrainfuckVersion\" value=\"2\"\u002F> \u003C!-- 1 = BF Classic, 2 = BrainPlus (BF Extended Type 3, Functions, Faster) -->\n\u003C\u002FappSettings>\n```\n\nWhen using sub-routines, less code is required. So, you can use a smaller genomeSize for speed. Expand the Genetic Algorithm Settings section and change the _genomeSize to a smaller value:\n\n```\nprivate static int _genomeSize = 50;\n```\n\nExperiment and have fun!\n\n## Author\n\nKory Becker\nhttp:\u002F\u002Fwww.primaryobjects.com\u002Fkory-becker\n\n[Using Artificial Intelligence to Write Self-Modifying\u002FImproving Programs](http:\u002F\u002Fwww.primaryobjects.com\u002FCMS\u002FArticle149)\n\n[Pushing the Limits of Self-Programming Artificial Intelligence](http:\u002F\u002Fwww.primaryobjects.com\u002FCMS\u002FArticle150)\n\n[Self-Programming Artificial Intelligence Learns to Use Functions](http:\u002F\u002Fwww.primaryobjects.com\u002FCMS\u002FArticle163)\n\n[BF-Programmer: A Counterintuitive Approach to Autonomously Building Simplistic Programs Using Genetic Algorithms](http:\u002F\u002Fwww.primaryobjects.com\u002Fbf-programmer-2017.pdf)\n\nView @ GitHub\nhttps:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002Fai-programmer\n\n## Copyright\n\nCopyright (c) 2018 Kory Becker http:\u002F\u002Fprimaryobjects.com\u002Fkory-becker\n","AI-Programmer\n=========\n\n阅读完整文章 [使用人工智能编写自修改\u002F改进程序](http:\u002F\u002Fwww.primaryobjects.com\u002F2013\u002F01\u002F27\u002Fusing-artificial-intelligence-to-write-self-modifying-improving-programs\u002F)\n\n阅读研究论文 [AI 程序员：使用遗传算法 (Genetic Algorithms) 自主创建软件程序](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1709.05703.pdf \"AI Programmer: Autonomously Creating Software Programs Using Genetic Algorithms\")。\n\nAI-Programmer 是一个实验，旨在利用人工智能 (Artificial Intelligence) 和遗传算法 (Genetic Algorithms) 自动生成程序。由 AI 成功创建的 [程序](https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Ftree\u002Fmaster\u002FResults) 包括：hello world, hello \u003Cname>, addition, subtraction, reversing a string, fibonnaci sequence, 99 bottles of beer on the wall, 以及更多。它正变得越来越聪明。简而言之，这是一个带有自修改代码 (Self-modifying code) 的 AI 遗传算法实现。\n\n## 动机\n\n计算机有可能编写自己的程序吗？需要文字处理器？让计算机为你创建一个。需要屏幕截图工具？让计算机为你创建一个。更进一步，让计算机创建简化你生活的程序，甚至是你自己都没意识到的需求！\n\n这就是 AI-Programmer 实验背后的理念。目标是最终创建一个能够编写自身计算机程序以解决特定计算问题的计算机程序。虽然计算机决定编写何种类型程序的能力超出了我们目前的手段，我们仍可以让计算机生成程序来解决非常具体的任务，例如输出文本 \"Hello World\"。AI 程序员使用一种晦涩的编程语言来生成软件程序。\n\n## 详情\n\n底层编程语言仅包含 8 条指令，同时具备图灵完备性 (Turing complete)。理论上，它有能力解决任何计算问题。这使得开发解释器 (Interpreter) 变得容易，该解释器能够在模拟环境中运行 AI 生成的程序。以此方式，每个生成的程序都可以被执行，并根据其性能排名为适应度分数 (fitness score)。由于 AI 使用的是图灵完备 (Turing complete) 的编程语言，AI 本身在理论上也具备解决任何计算问题的能力。然而，对于本实验，AI 将专注于向控制台输出简单字符串。\n\n## 工作原理\n\nAI-Programmer 的工作原理如下：\n\n- 基因组 (Genome) 由双精度浮点数数组组成。\n- 每个基因 (Gene) 对应编程语言中的一条指令。\n- 从随机基因组种群 (Population) 开始。\n- 通过将每个双精度数转换为其对应的指令并执行程序，将每个基因组解码为结果程序。\n- 根据程序写入控制台的输出（如果有），获取每个程序的适应度分数 (fitness score) 并进行排名。\n- 使用轮盘赌选择 (Roulette selection)、交叉 (Crossover) 和变异 (Mutation) 将最佳基因组结合，产生新一代。\n- 用新一代重复此过程，直到达到目标适应度分数。\n\n## 适应度方法\n\n适应度方法通过对生成程序的输出进行评分来工作。分数是通过查看程序输出的每个字符并将其值与目标字符相减来计算：\n\n```\nfitness += 256 - Math.Abs(console[i] - targetString[i]);\n```\n\n## 解释器指令集\n\n```\n> \tIncrement the pointer.\n\u003C \tDecrement the pointer.\n+ \tIncrement the byte at the pointer.\n- \tDecrement the byte at the pointer.\n. \tOutput the byte at the pointer.\n, \tInput a byte and store it in the byte at the pointer.\n[ \tJump forward past the matching ] if the byte at the pointer is zero.\n] \tJump backward to the matching [ unless the byte at the pointer is zero.\n```\n\n## 结果？\n\n请记住，这是一个概念验证 (Proof of concept)。到目前为止，该程序已成功在其目标编程语言中编写了几个程序。你可以在 [\u002FResults](https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Ftree\u002Fmaster\u002FResults) 文件夹中查看所有结果的截图。这些测试是在 Intel Core 2 Quad 2.5GHz 上运行的。\n\n## hi\n\nAI 成功编写了一个程序，在约 1 分钟后的第 5,700 代输出了 \"hi\"。它生成了以下代码：\n\n```\n+[+++++-+>++>++-++++++\u003C\u003C]>++.[+.]-.,-#>>]\u003C]\n```\n\n虽然上述代码包含解析错误，如不匹配的括号，我们的模拟解释器 (Interpreter) 会计算直到程序失败为止的结果，因此在上述情况下，语法错误（稍后出现在代码中，在找到解决方案之后）不会影响适应度。\n\n你可以尝试将上述代码粘贴到在线 [解释器](http:\u002F\u002Fwww.iamcal.com\u002Fmisc\u002Fbf_debug\u002F) 中。点击“启动调试器”，忽略警告，然后点击“运行到断点”。注意输出。\n\n如果我们修剪掉多余的代码，可以看到以下语法有效的代码：\n\n```\n+[+++++-+>++>++-++++++\u003C\u003C]>++.[+.]\n```\n\n## hello\n\nAI 成功编写了一个程序，在约 29 分钟后的第 252,0000 代输出了 \"hello\"。它生成了以下代码：\n\n```\n+-+-+>-\u003C[++++>+++++\u003C+\u003C>++]>[-[---.--[[-.++++[+++..].+]],]\u003C-+\u003C+,.+>[[.,],+\u003C.+-\u003C,--+.]],+][[[.+.,,+].-\n```\n\n在生成过程中，AI 非常接近解决方案，但有几个字母被绑定在一起，位于一个循环内。AI 能够通过在该问题循环内创建一个内部循环来克服这一点，该内部循环成功输出了正确的字符，并继续处理。\n\n## Hi!\n\n在另一个例子中，AI 成功编写了一个程序，在约 2 小时 7 分钟后的第 1,219,400 代输出了 \"Hi!\"。它生成了以下代码：\n\n```\n>-----------\u003C++[[++>++\u003C+][]>-.+[+++++++++++++++++++++++++++++>\u003C+++.\u003C>\u003C-->>>+].]\n```\n\n## I love all humans\n\nAI 成功编写了一个程序，在约 10 小时后的第 6,057,200 代输出了 \"I love all humans\"。它生成了以下代码：\n\n```\n+[>+\u003C+++]+>------------.+\u003C+++++++++++++++++++++++++++++++.>++++++++++++++++++++++++++++++++++.+++.+++++++.-----------------.--\u003C.>--.+++++++++++..---\u003C.>-.+++++++++++++.--------.------------.+++++++++++++.+++++.\n```\n\n使用更快的 PC 可能会生成更复杂的程序。下一步包括尝试接受用户输入并处理结果。\n\n## 代码使用快速入门指南\n\n兼容 Visual Studio 和 VS Code。\n\n- 克隆 `master` 分支并使用 [Visual Studio](https:\u002F\u002Fvisualstudio.microsoft.com\u002Fvs\u002Fcommunity\u002F) 打开。\n- 克隆 [vscode-net90](https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Ftree\u002Fvscode-net90) 分支并使用 VS Code 和 .NET 9.0 打开。\n\n### 使用代码\n\n默认情况下，代码配置为使用经典指令集，并编写一个用于输出字符串的程序。若要更改生成的字符串，只需展开“私有变量”部分，并将 TargetString 的文本更改为您想要的值。\n\n```\nprivate static TargetParams _targetParams = new TargetParams { TargetString = \"hello world\" };\n```\n\n若要更改 AI 所编写的程序类型，请修改 GetFitnessMethod() 内部的适应度方法（fitness method）。\n\n```\nprivate static IFitness GetFitnessMethod()\n{\n\treturn new StringStrictFitness(_ga, _maxIterationCount, _targetParams.TargetString, _appendCode);\n}\n```\n\n您可以将其更改为 AI.Programmer.Fitness\u002FConcrete 项目中的任何类。示例：\n\n```\nreturn new StringStrictFitness(_ga, _maxIterationCount, _targetParams.TargetString, _appendCode);\nreturn new AddFitness(_ga, _maxIterationCount);\nreturn new SubtractFitness(_ga, _maxIterationCount);\nreturn new ReverseStringFitness(_ga, _maxIterationCount);\nreturn new HelloUserFitness(_ga, _maxIterationCount, _targetString);\n```\n\n要使用子例程（sub-routines），您需要启用函数功能。这将使 AI 生成程序的速度快得多。取消注释 functionGenerator 的代码，如下所示：\n\n```\nprivate static IFunction _functionGenerator = new StringFunction(() => GetFitnessMethod(), _bestStatus, fitnessFunction, OnGeneration, _crossoverRate, _mutationRate, _genomeSize, _targetParams);\n```\n\n将 App.config 设置为使用 BrainPlus，以便 AI 可以访问子例程指令：\n\n```\n\u003CappSettings>\n\t\u003Cadd key=\"BrainfuckVersion\" value=\"2\"\u002F> \u003C!-- 1 = BF Classic, 2 = BrainPlus (BF Extended Type 3, Functions, Faster) -->\n\u003C\u002FappSettings>\n```\n\n使用子例程时，所需代码更少。因此，为了提升速度，您可以使用更小的 genomeSize。展开遗传算法设置（Genetic Algorithm Settings）部分，并将 _genomeSize 更改为较小的值：\n\n```\nprivate static int _genomeSize = 50;\n```\n\n尽情实验，享受乐趣！\n\n## 作者\n\nKory Becker\nhttp:\u002F\u002Fwww.primaryobjects.com\u002Fkory-becker\n\n[使用人工智能编写自修改\u002F改进程序](http:\u002F\u002Fwww.primaryobjects.com\u002FCMS\u002FArticle149)\n\n[突破自编程人工智能的极限](http:\u002F\u002Fwww.primaryobjects.com\u002FCMS\u002FArticle150)\n\n[自编程人工智能学会使用函数](http:\u002F\u002Fwww.primaryobjects.com\u002FCMS\u002FArticle163)\n\n[BF-Programmer：一种利用遗传算法自主构建简单程序的非常规方法](http:\u002F\u002Fwww.primaryobjects.com\u002Fbf-programmer-2017.pdf)\n\n在 GitHub 上查看\nhttps:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002Fai-programmer\n\n## 版权\n\n版权所有 (c) 2018 Kory Becker http:\u002F\u002Fprimaryobjects.com\u002Fkory-becker","# AI-Programmer 快速上手指南\n\nAI-Programmer 是一个利用人工智能和遗传算法自动生成程序的实验性项目。它通过进化计算，让计算机自动编写出解决特定任务的代码（基于类 Brainfuck 的图灵完备语言）。\n\n## 环境准备\n\n*   **操作系统**: Windows \u002F macOS \u002F Linux\n*   **开发工具**: \n    *   Visual Studio 2022 (推荐用于 `master` 分支)\n    *   VS Code + .NET 9.0 SDK (推荐用于 `vscode-net90` 分支)\n*   **依赖项**: .NET 9.0 Runtime\u002FSDK\n\n## 安装步骤\n\n1.  **克隆代码仓库**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer.git\n    cd AI-Programmer\n    ```\n\n2.  **选择分支并打开项目**\n    *   **使用 Visual Studio**:\n        ```bash\n        git checkout master\n        ```\n        在 Visual Studio 中打开解决方案文件。\n    \n    *   **使用 VS Code**:\n        ```bash\n        git checkout vscode-net90\n        ```\n        确保已安装 .NET 9.0 SDK，然后在 VS Code 中打开项目文件夹。\n\n## 基本使用\n\n### 1. 修改生成目标字符串\n默认配置下，程序会尝试生成输出 `\"hello world\"` 的代码。如需更改目标文本，请编辑以下变量：\n\n```csharp\nprivate static TargetParams _targetParams = new TargetParams { TargetString = \"hello world\" };\n```\n\n### 2. 切换任务类型\n默认任务为生成字符串。若要执行其他任务（如加法、减法、反转字符串等），需修改 `GetFitnessMethod()` 方法中的返回对象：\n\n```csharp\nprivate static IFitness GetFitnessMethod()\n{\n    \u002F\u002F 示例：生成加法程序\n    return new AddFitness(_ga, _maxIterationCount);\n    \n    \u002F\u002F 示例：生成反转字符串程序\n    \u002F\u002F return new ReverseStringFitness(_ga, _maxIterationCount);\n}\n```\n可用的 Fitness 类位于 `AI.Programmer.Fitness\u002FConcrete` 项目中。\n\n### 3. 启用子程序功能 (可选)\n为了加快生成速度，可以启用函数支持。\n\n1.  **修改配置文件** (`App.config`)：\n    将 `BrainfuckVersion` 设置为 `2` 以启用 BrainPlus 模式。\n    ```xml\n    \u003CappSettings>\n        \u003Cadd key=\"BrainfuckVersion\" value=\"2\"\u002F> \u003C!-- 1 = BF Classic, 2 = BrainPlus -->\n    \u003C\u002FappSettings>\n    ```\n\n2.  **启用函数生成器** (代码中取消注释)：\n    ```csharp\n    private static IFunction _functionGenerator = new StringFunction(() => GetFitnessMethod(), _bestStatus, fitnessFunction, OnGeneration, _crossoverRate, _mutationRate, _genomeSize, _targetParams);\n    ```\n\n3.  **调整基因组大小** (可选)：\n    使用子程序时，可减小基因组大小以提升速度：\n    ```csharp\n    private static int _genomeSize = 50;\n    ```\n\n完成上述配置后，运行项目即可开始训练。AI 将根据设定的目标迭代生成代码，并在控制台输出最终结果及生成的指令序列。","某物联网设备维护团队需要为资源受限的嵌入式芯片生成多个执行特定数据格式化任务的微型程序，目标芯片仅支持一种特殊的 8 指令虚拟机架构。\n\n### 没有 AI-Programmer 时\n- 工程师需手动编写晦涩的底层指令，耗时极长且极易出现语法错误导致程序崩溃。\n- 调整功能逻辑（如增加校验位或修改循环次数）必须重写代码并重新编译验证，反馈周期慢。\n- 难以穷举所有可能的指令组合来寻找最优的代码体积方案，往往只能凭经验猜测。\n- 缺乏自动化测试机制，无法快速评估不同实现方案的执行效率，依赖人工逐个检查。\n\n### 使用 AI-Programmer 后\n- AI-Programmer 根据目标输出自动演化出合法的指令序列，完全省去了手写底层代码的过程。\n- 利用遗传算法迭代优化，直接生成满足性能要求的最终程序代码，大幅缩短开发周期。\n- 可批量生成不同版本的解决方案，快速对比筛选出最佳匹配项，适应多变的业务需求。\n- 内置模拟器自动验证输出结果，确保生成的程序逻辑准确无误，减少后期调试成本。\n\nAI-Programmer 将特定领域的重复性编码工作转化为自动化进化过程，显著提升了底层程序的开发效率与准确性。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fprimaryobjects_AI-Programmer_af3b22b2.png","primaryobjects","Kory Becker","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fprimaryobjects_f02e5cd8.jpg","Software Developer. Quantum Computing. Artificial Intelligence.","Primary Objects","Philadelphia",null,"http:\u002F\u002Fwww.primaryobjects.com","https:\u002F\u002Fgithub.com\u002Fprimaryobjects",[85],{"name":86,"color":87,"percentage":88},"C#","#178600",100,1101,266,"2026-03-30T15:23:09","Windows, Linux, macOS","未说明",{"notes":95,"python":93,"dependencies":96},"该项目基于 C#\u002F.NET 框架开发（非 Python 项目），需安装 .NET 9.0 SDK。使用遗传算法在 CPU 上运行，无 GPU 需求。支持 Visual Studio 和 VS Code 开发环境。",[97],".NET SDK 9.0",[15,14,13],[100,101,102,103,104,105,106,107,108,109],"genetic-algorithms","c-sharp","fitness-score","ai","artificial-intelligence","genetic-algorithm","genetic-programming","programming-language","genome","program-synthesis","2026-03-27T02:49:30.150509","2026-04-06T05:19:28.435685",[113,118,122,127,132,136],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},2475,"该项目是否支持 GPU 加速？","目前代码主要在 CPU 上运行，但利用了 Parallel.ForEach() 来利用多核优势。使用 GPU 理论上会运行得更快，因为涉及大量重复的小操作，但目前尚未实现。作者认为速度只是暂时的限制，随着计算机发展会自然提升。","https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Fissues\u002F2",{"id":119,"question_zh":120,"answer_zh":121,"source_url":117},2476,"适应度评分（Fitness Scoring）具体包含哪些标准？","评分系统不仅考虑编译成功和避免死循环，还包含操作数量的考量。这有助于淘汰运行时间过长或无限循环的程序，并优先选择执行效率更高的代码。最简单的适应度方法通常能产生更好的结果。",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},2477,"精英策略（Elitism）是如何选择保留到下一代的基因组的？","基因组在每一代结束后会进行排序（sorted）。精英策略确保当前代中得分最高的两个基因组被复制到下一代，以在突变可能产生负面影响时保持种群的稳定性。","https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Fissues\u002F8",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},2478,"如何向项目中添加新的指令命令？","可以通过修改 CommonManager.cs 文件来供应新指令的范围（ranges），然后在 Interpreter.cs 文件中将新命令添加到解释器中。这种方法使得添加新指令相对容易，例如曾计划添加网络或文件 I\u002FO 功能。","https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Fissues\u002F1",{"id":133,"question_zh":134,"answer_zh":135,"source_url":131},2479,"如何实现确定性的程序行为（每次运行结果一致）？","可以通过硬编码随机数生成器的种子值（seed value）来实现。这样做可以确保每次运行程序时获得完全相同的确定性行为，这对于单元测试非常有用。原始代码也支持通过权重来控制不同指令的执行频率。",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},2480,"为什么 \"hello\" 程序的进化收敛效果不如其他简单任务？","可能是因为某些特定的代码结构（如 \"100+[++++..]\"）在进化早期就获得了极高的适应度分数，从而迅速占据整个种群，导致算法陷入进化死胡同。建议检查所使用的随机数生成机制，看是否存在偏差。","https:\u002F\u002Fgithub.com\u002Fprimaryobjects\u002FAI-Programmer\u002Fissues\u002F11",[142,145,148,151],{"id":143,"version":144,"summary_zh":81,"released_at":81},102025,"v1.0",{"id":146,"version":147,"summary_zh":81,"released_at":81},102026,"OPTIMIZED_CODE",{"id":149,"version":150,"summary_zh":81,"released_at":81},102027,"BEFORE_STRATEGY",{"id":152,"version":153,"summary_zh":81,"released_at":81},102028,"BEFORE_SIMPLE_FITNESS_MERGE"]