6 ms·
Logic Production Systems: A new mixed logic/imperative programming language
- hbk1966 10y agoThis is pretty cool.
- nickpsecurity 10y agoJustification from author: http://blog.ruleml.org/post/32629706-the-sad-state-concerning-the-relationships-between-logic-rules-and-logic-programming http://blog.ruleml.org/post/32629706-the-sad-state-concernin...
- notthemessiah 10y agoI recall trying a few mods that made Kerbal Space Program programmable so you can automate your rocket (Some have used it to make SpaceX-style reusable boosters: https://www.youtube.com/watch?v=sqqQy8cIVFY https://www.youtube.com/watch?v=sqqQy8cIVFY), and mods that provided a domain-specific language were more convenient than mods that used an existing conventional programming language. However the kOS language was still ultimately an imperative script, and too inflexible to be a complete programming language. It got me thinking about what kind of language would best be suited for the purpose of controllers (I was also writing PID controllers at the time), and I noticed there wasn't a language for it. I also recall a Minecraft mod called ComputerCraft where you program a "Turtle" (a la Logo) to perform automated digging actions, but the task of programming it in the easily-embedded Lua proved somewhat inconvenient for simple actions, if only for the ALGOL-style syntax. Another mod tried Forth, but get the sense that while one could be productive in Forth, it's a lot to learn. The developers have already incorporated it in a proof of concept game: https://bobthesimplebot.github.io/ https://bobthesimplebot.github.io/, but I could imagine RTS style games or mods where you not only have to scavenge for resources, you also program your bots to do your bidding, like Dwarf Fortress with programmable drones instead of independently-minded Dwarves.
- cpdt 10y ago> I could imagine RTS style games or mods where you not only have to scavenge for resources, you also program your bots to do your bidding, like Dwarf Fortress with programmable drones instead of independently-minded Dwarves. Sounds sort of like Screeps [1]. It's an MMO game where you write scripts in JS to control different robots (so, not logic programming, but still pretty fun with lots of depth). Parts of it are also open source [2]. [1] https://screeps.com/ https://screeps.com/ [2] https://github.com/screeps/screeps https://github.com/screeps/screeps
- rl3 10y agoThe concept underlying Screeps basically amounts to my dream RTS. While I haven't played it yet, the only thing that worries me is the tick rate. The trailer videos all use the history replay feature so as to appear real-time, when in actuality you're talking a simulation tick rate of anywhere from 1hz (private server) to something like 0.25-0.5hz on regular/MMO servers. A normal RTS would probably sim in excess of 25hz, though Supreme Commander sims at 10hz and is perfectly fine. While the idea is fantastic, it kind of sounds like it's a bit similar to watching paint dry in practice. (Please correct me if I'm wrong; going off of Steam reviews alone here.)
- SomeHacker44 10y agoScreeps is a lot of fun. (I've published my whole code on GitHub when I retired after about four months.) The tick rate on the main server is more than adequate. You can run your own server locally to test things at a faster tick rate.
- ekidd 10y agoI've actually been really impressed by Shenzhen I/O (http://www.zachtronics.com/shenzhen-io/ http://www.zachtronics.com/shenzhen-io/), which is a game where you have to program microcontrollers to build weird products. The built-in programming language is an ultra-simple assembly language, with either one or two registers, and about a dozen operations. Program length is limited to about 10 or 15 statements. There are external ROM and RAM modules which store about 20 values. Every challenge comes with a pre-made test suite. Something about these extreme restrictions and the simplicity make for excellent, puzzle-style gameplay. And I think you could add a Shenzhen I/O-like "microcontroller" to a lot of automation games (like Factorio: https://www.factorio.com/ https://www.factorio.com/) and it would work very well. I think that one of the problems with adding traditional programming languages to games is that there are no constraints to make it challenging, and that you can write fairly large programs. But a deliberately limited and simple language could be fun.
- contingencies 10y agoFor an alternative introduction see my guide Junior Embedded Engineer's Manual at http://steamcommunity.com/sharedfiles/filedetails/?id=780361834 http://steamcommunity.com/sharedfiles/filedetails/?id=780361...
- jefurii 10y ago> I also recall a Minecraft mod called ComputerCraft There's also OpenComputers https://github.com/MightyPirates/OpenComputers https://github.com/MightyPirates/OpenComputers
- trapperkeeper79 10y agoLogic programming and productions are a wonderful idea that I studied in undergrad back in pre-2000. These days, people seem hostile towards them. People just don't like the idea of specifying rules. I couldn't find modern intro textbooks on the topic or classes that cover it on MOOCs. I'm very surprised and confused.
- saosebastiao 10y agoThe trendy way to approach the problem these days is to throw massive amounts of data at a deep learning model and let the model try to learn the rules. And my irony detector can't help but squalk out the famous minsky koan: "What are you doing?", asked Minsky. "I am training a randomly wired neural net to play Tic-tac-toe", Sussman replied. "Why is the net wired randomly?", asked Minsky. "I do not want it to have any preconceptions of how to play", Sussman said. Minsky then shut his eyes. "Why do you close your eyes?" Sussman asked his teacher. "So that the room will be empty." At that moment, Sussman was enlightened. Machine Learning has its use cases, that's for sure, but I can't help but laugh at the person who eschews a well understood model of a well understood system by an experienced and trained expert human in favor of a magic black box that at its best might converge on the expert's understanding after enough time and data. There is no shame in building off of what is already known and understood.
- trapperkeeper79 10y agoAny tips for introductory/intermediate material on the topic? In undergrad, we used Russel and Norvig. Surely there are more advanced books or courses.
- saosebastiao 10y agoOn expert systems specifically no. With the AI winter of the early 90's, not only did expert systems research die, but so did publisher interest in the topic. "Expert Systems" is effectively a dead field of study. That being said, the field of Operations Research, at least philosophically speaking, has picked up where AI researchers dropped it off. They've fully embraced the idea that human experts can model many systems extremely well, and have built incredible tools to do so: mathematical modeling and optimization, constraint programming, boolsat, graphical models, etc. Effectively speaking, if you think expert systems are cool, the next logical step is to delve into constraint programming, which is a sort of evolution of logic programming. I'd recommend the Minizinc Tutorial for a practical introduction with a nice DSL. Constraint Processing by Rina Dechter is a great intro with a more academic bent. I'd say mathematical modeling has been Ops Research's greatest success, and I'd definitely recommend Model Building with Mathematical Programming by Paul Williams. I'd also say that Baysians have embraced these ideas (that of building upon human expertise) within the field of Machine Learning far more than other ML researchers have. My recommendations here are probably less helpful...I've only ever toyed with Bayesian learning models, but never employed them professionally. But I would recommend Doing Bayesian Data Analysis by Kruschke. It was very helpful as an introductory material.
- someone79879 10y agohttps://en.wikipedia.org/wiki/Curry_(programming_language) https://en.wikipedia.org/wiki/Curry_(programming_language)
- andrewflnr 10y ago"Domain specific causal theory" means "program you wrote", right? Your if-then statements?
- contingencies 10y agoAt http://blog.ruleml.org/post/32629706-the-sad-state-concerning-the-relationships-between-logic-rules-and-logic-programming http://blog.ruleml.org/post/32629706-the-sad-state-concernin... Kowalski summarizes his theory of the classification of rules (within production logic systems) in to a triple typology, and suggests that the last of these types, which he terms reactive rules, are more fundamental, and "the driving force of life". These are rules which define a subsequent action or state from current conditions, ie. "if hungry then eat". To fully grasp the idea it is important to understand the different natures of logic programming versus imperative/procedural programming... there is not really an if-then-else-style (ie. control flow oriented) program state. Rather, the programmer tends to throw a bunch of formal rules at a 'solver' which simply determines the result.
- Gormisdomai 10y agoHere are some example programs: http://lpsdemo.interprolog.com/example/lpsExamples.swinb http://lpsdemo.interprolog.com/example/lpsExamples.swinb I've always thought that someone armed with an efficiently implemented Logic Programming Language could sweep through the first few rounds of competitions like Google Code Jam.
- mosqutopi 10y agoVery long time ago I was trying to program many matroids algorithms, let's say that matroids are a generalization of vector spaces and independence, in prolog. I could program those algorithm in many languages, for example in Lisp, but programming in Prolog was very painful. I think that prolog related programming is a useful tool when the program is similar to those solved by forward chaining but in other cases I can't not see the benefits, the dismissal of Prolog in day to day programming seems to reflect that sentiment.
- fspeech 10y agoProf. Kowalski has a draft version of his book available on his website, which should provide background information on LPS: http://www.doc.ic.ac.uk/~rak/papers/newbook.pdf http://www.doc.ic.ac.uk/~rak/papers/newbook.pdf Computational Logic and Human Thinking: How to be Artificially Intelligent "This earlier draft of a book of the same title, published in July 2011 by Cambridge University Press, presents the principles of Computational Logic, so that they can be applied in everyday life. I have written the main part of the book informally, both to reach a wider audience and to argue more convincingly that Computational Logic is useful for human thinking."