Live data from Hacker News

Logic Production Systems: A new mixed logic/imperative programming language

lambda-the-ultimate.org

11–20 of 35 posts

Re: Logic Production Systems: A new mixed logic/imperative programming language

#11
post #6

I 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 ), 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 t…

> 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…

The 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.)

Re: Logic Production Systems: A new mixed logic/imperative programming language

#13

Earlier quoted context omitted.

Any tips for introductory/intermediate material on the topic? In undergrad, we used Russel and Norvig. Surely there are more advanced books or courses.

On 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 sys…

Constraint logic programming indeed evolved from logic programming, but it encompasses such diverse topics as finite-domain propagation, integer interval propagation, SAT solvers, linear and restricted polynomial optimization, discrete planning and constraint satisfaction strategy meta languages that the only commonality seems the more or less Prolog-like syntactical presentation. These vastly different formalisms were cast into terms such as CP(x) (meaning constraint programming over x, for x the reals or other domains) but this doesn't give you a solution strategy (the solution strategies being as varied as math itself).

Re: Logic Production Systems: A new mixed logic/imperative programming language

#14

Earlier quoted context omitted.

The 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 an…

Any tips for introductory/intermediate material on the topic? In undergrad, we used Russel and Norvig. Surely there are more advanced books or courses.

Some prolog books have chapters on how to implement ExpSys on it. I don't know much about this field, but in case you have nothing better ..

ps: this book https://www.amazon.ca/Prolog-Programming-Artificial-Intellig...

Re: Logic Production Systems: A new mixed logic/imperative programming language

#15

Logic 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.

I'm not hostile to them per-se, but I don't see much usefulness in systems like this one these days.

For some kinds of video game agents, traditional logic programming might be fine.

But for anything that I would consider using in the real world, I would want to use probabilistic knowledge representation and reasoning.

Even for many kinds of video games you'd want that instead. Like in a first person shooter where the agents have limited knowledge of the world state, you want to be able to reason about the other player's position and status without cheating, so that the agent can be more realistic and fair.

Re: Logic Production Systems: A new mixed logic/imperative programming language

#16

I 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 ), 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 t…

I've actually been really impressed by Shenzhen I/O (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/) 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.

Re: Logic Production Systems: A new mixed logic/imperative programming language

#17
post #15

Logic 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.

I'm not hostile to them per-se, but I don't see much usefulness in systems like this one these days. For some kinds of video game agents, traditional logic programming might be fine. But for anything that I would consider using in the real world, I would want to use probabilistic knowledge representation and reasoning. Even for many kinds of video games you'd want that instead. Like in a first person shooter where th…

I work for a living in a company that creates products to calculate timetables and schedules for transport companies.

The schedules and timetables need to be exactly, defined according to a large number of requirements (hard constraints and weighted preferences).

While these exact schedules could be created through probabilistic means, the systematic approach of logic search provides more consistent results than a stochastic search, and the imperative programming style allows finer control over the search algorithm than what would be easy to achieve in a pure logic language.

Re: Logic Production Systems: A new mixed logic/imperative programming language

#18

Logic 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.

Some of what logic programming represented became absorbed into "semantic web" technologies (RDF, SPARQL, OWL/OWL2), and went down with it, though I think actually OWL2 (description logic) isn't half bad and has lots of vertical use in eg. bibliography systems, taxonomic meta knowledge bases for medical and other research support systems, and backends for graph databases like OpenGraph. I remember RDF being used for metadata in Linux desktop search software, and folks hated it.

Prolog, OTOH, is as minimalistic and pragmatic as ever, with many implementations around, based on an ISO standard even. There's a slowly evolving initiative to come up with an extended standard library across Prolog implementations (eg. Prolog Commons). Though as you might know, Prolog doesn't solve hard problems in itself; rather, it gives you a Turing-complete language based on backtracking, negation-as-failure, closed-world reasoning, and extra-logical mechanisms as primitives to build more interesting reasoning or planning/optimization problems on.

Re: Logic Production Systems: A new mixed logic/imperative programming language

#19

Logic 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.

The 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 an…

But I think experience has already shown that machine learning models blow away expert systems in a lot of domains.

Re: Logic Production Systems: A new mixed logic/imperative programming language

#20
Here are some example programs:

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.

Post reply on HN