以下是关于生成放烟花代码的相关信息:
前段时间在用Cursor写代码,遇到一个让人抓狂的问题——一开始AI输出的代码还挺正常,可是越聊到后面,它突然开始"放飞自我":生成的代码乱七八糟,目录结构完全不对,命名风格也很混乱...那会我还不知道.cursorrules这个"宝藏",只能一遍遍地提醒AI:"要用这个框架","放到那个目录","按这个规范写"。直到我发现了Cursor的隐藏功能,才彻底解决了这个困扰...[heading2]一、什么是.cursorrules[content]简单来说,.cursorrules就是一个需要放在项目根目录的"说明书"。想象一下,你请了个助手帮你整理房间。第一次你得告诉他:"衣服要叠好放衣柜""书本要按大小排列""零食要放储物盒"...但如果你把这些要求写成一份"整理指南",助手每次来都能按照这个指南操作,是不是就不用重复说了?.cursorrules就是这样的存在——你提前把编码规则、项目结构、注意事项写在这个文件里,AI就会自动按照这些"要求"来帮你写代码。
Adobe is committed to taking a creator-friendly approach and developing AI in accordance with our[AI Ethics principles](https://www.adobe.com/ai/overview/ethics.html)of accountability,responsibility and transparency.We have over a decade-long history of delivering hundreds of intelligent capabilities into applications that millions of people rely upon and we’re continuing to integrate technology into our tools in a way that is respectful and supportive of the creative community.[Our Firefly generative AI models](https://blog.adobe.com/en/publish/2023/03/21/responsible-innovation-age-of-generative-ai)are trained on licensed content,such as[Adobe Stock](https://stock.adobe.com/),and public domain content—and are never trained on customer content.In addition,we continue to innovate ways to protect our customers through efforts including Content Credentials with attribution for creators and provenance of content.Adobe is determined to be a trusted partner for creators in the era ahead.We co-founded a global coalition called the[Content Authenticity Initiative](https://contentauthenticity.org/)(CAI),which now has more than 2,500 members from across industries working together to promote transparency in digital content.We’ll attach[Content Credentials](https://contentcredentials.org/)to assets produced using Firefly so that people who work with or view the content can see how it was made and whether AI was involved.This ensures we establish a transparent chain of trust from creation to dissemination online.We can’t wait to see what you create.[Join the waitlist](https://www.adobe.com/products/firefly/features/ai-video-generator.html)to be next in line to gain access to Adobe Firefly Video Model.
单独给AI从零开始写一些小功能没有任何问题,相信这类案例已经不少了,但是《玩具帝国》的情况不足以让AI从零开始,而AI还没到可以完全写出程序架构的时候。如果让AI给我写小功能的话,我写的程序框架又比较复杂,而现在的AI还不足以把我所有的程序框架学会,所以我的解决方案是,把不方便配表而又需要撰写的代码交给AI。这种代码的特点是简单、模板化、多是调用API,只牵涉小部分的特殊逻辑。以Buff系统为例,游戏里的Buff特别多,有些Buff带有不同的执行逻辑,不方便统一配表,撰写这些Buff的代码又非常耗时。试了下用Cursor让它仿照我的代码写一些Buff,发现生成结果可以直接用。不过目前Cursor生成复杂代码还需要复杂的前期调教,多开几次之后觉得很麻烦,用多了之后发现还是ChatGPT比较方便。以下面这段代码为例,我给出的模板代码是对ProducebleCombatUnitBase单位的Attack、Defence、Speed属性进行调整:我将多段类似的代码喂给AI后,询问它是否学会了,并让他总结规律:然后,尝试让它撰写一个类似的:Then please write a Buff,which acts on a Musketeer,and Musketeer is a kind of unit.What it does is make its CostFood 1.5 times what it was.教AI就像哄小孩,有正确的需要及时肯定,不过似乎AI对否定非常敏感,指出错误的时候要克制,不断完善它的经验。现在尝试写一个复杂的Buff,作用于一个Worker,Buff生效后,Worker的生命值和速度将翻倍。Buff失败时,如果Worker的HP不大于50,Buff的效果会恢复,否则不恢复。