符号编程的例子有哪些?
我必须在符号编程课上做一个学期项目。但我不太确定什么是好的/合法的项目。谁能给我一些符号编程的例子?只是任何通用的想法,因为现在我倾向于回合制格斗游戏(基本上是 jrpg 风格),但我真的不想做游戏。
I have to do a term project in my symbolic programming class. But I'm not really sure what a good/legitimate project would be. Can anyone give me examples of symbolic programming? Just any generic ideas because right now I'm leaning towards a turn based fight game (jrpg style basically), but I really don't want to do a game.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Peter Norvig 的人工智能编程范式,Common Lisp 案例研究一书在这方面非常有用。
本书详细描述了使用 Common Lisp 进行符号 AI 编程。
这些示例属于计算机代数、解决数学任务、玩游戏、编译器实现等领域。
很快就会有另一本有趣的书:Conrad Barski 的The Land of Lisp。
一般来说,符号编程有很多可能的应用:
The book Paradigms of Artificial Intelligence Programming, Case Studies in Common Lisp by Peter Norvig is useful in this context.
The book describes in detail symbolic AI programming with Common Lisp.
The examples are in the domain of Computer Algebra, solving mathematical tasks, game playing, compiler implementation and more.
Soon there will be another fun book: The Land of Lisp by Conrad Barski.
Generally there are a lot of possible applications of Symbolic Programming:
Scheme 中的一个简单算术解释器,将符号列表作为输入:
测试运行:
这显示了元循环解释器背后的基本思想。 Lisp in Small Pieces 是了解此类解释器的最佳场所。
另一个简单的例子,其中符号列表用于实现键值数据存储:
如果您是 Lisp 新手,Common Lisp:符号计算简介 是一个很好的起点。
A simple arithmetic interpreter in Scheme that takes a list of symbols as input:
Test run:
That shows the basic idea behind meta-circular interpreters. Lisp in Small Pieces is the best place to learn about such interpreters.
Another simple example where lists of symbols are used to implement a key-value data store:
If you are new to Lisp, Common Lisp: A Gentle Introduction to Symbolic Computation is a good place to start.
这并不是(只是)赤裸裸地试图窃取@Ken 的代表权。我不记得麦卡锡创建 Lisp 的最初动机是什么。但它当然适合计算机代数,包括微分和积分。
不过,我发帖的原因是,自动微分用于表示微分符号表达式之外的其他含义。它用于表示编写一个计算另一个函数的导数的函数。例如,给定一个计算
f(x)
的 Fortran 程序,自动微分工具将编写一个计算f'(x)
的 Fortran 函数。当然,一种技术是尝试将程序转换为符号表达式,然后使用符号微分,然后再次将所得表达式转换为程序。第一个是符号计算的一个很好的练习,尽管它被广泛使用,以至于它可能不是学期论文的好选择。第二个是活跃的研究前沿,OP 必须小心,不要贪多嚼不烂。然而,即使是有限的实施也会很有趣且具有挑战性。
This isn't (just) a naked attempt to steal @Ken's rep. I don't recall what McCarthy's original motivation for creating Lisp might have been. But it is certainly suitable for computer algebra, including differentiation and integration.
The reason that I am posting, though, is that automatic differentiation is used to mean something other than differentiating symbolic expressions. It's used to mean writing a function which calculate the derivative of another function. For example, given a Fortran program which calculates
f(x)
an automatic differentiation tool would write a Fortran function which calculatesf'(x)
. One technique, of course, is to try to transform the program into a symbolic expression, then use symbolic differentiation, then transform the resulting expression into a program again.The first of these is a nice exercise in symbolic computation, though it is so well trodden that it might not be a good choice for a term paper. The second is an active research front and OP would have to be careful not to bite off more than (s)he can chew . However, even a limited implementation would be interesting and challenging.