I talk a lot about Prolog but really what I want is just a language I can write an Infocom / SHRDLU style adventure game / text-based AI simulation in.

My problem is I have high expectations for a language because I want to do what seems to me to be very simple things:

* have the world obey rules, so all actions cause consequences

* rules that can be changed at runtime

* game AIs can read these rules and make plans

* save/ load the game state to/from disk

Turns out getting these is HARD.

@natecull you have an interesting set of requirements, and I cannot say I’ve heard of anything that really fits all of them, but if i were to build something, I would probably start with sqlite, provided that your “rules” are logic rules and not fuzzier physics rules

@natecull it’s not commonly taught with this style of usage in mind, but the original point of “relational databases” was to have something like prolog with a runtime modifiable set of facts.

Follow

@zensaiyuki hmm, and how would sqlite relate to save-games? and multiple games?

I mean if your data model is gonna be restricted to what can fit in a SQL database, and only needs to be serialised at game start and end, you might as well just use.... text?

@natecull “just text” doesn’t give you the logical induction capabilities that sql gives you. a save game would be the list of actions that were taken, including modifications to the world. it’s kinda hard to explain what I mean without a whiteboard

@zensaiyuki just as a reminder:

The Infocom save-game format is literally a memory dump of a simulated Lisp machine.

And you'd put this into a SQL schema? Good luck.

@natecull no of course not. that would be silly. how do you expect to break beyond the likits of the infocom engine by copying what it does?

@zensaiyuki one doesn't normally break beyond limits by imposing smaller ones...

@natecull I am not, you’re just applying a stereotype of what an sql database is, beliving i am referring to that, when I am not.

@natecull i am referring to the version of sql where each “table” represents a logical predicate, and a query implementing a logical induction engine.

@natecull not a save game that is loaded, and then dumped at the beginning and ending of each session, but a session represented as a stream of events that can be mechanically projected via a fold function to produce the state of the world at any given point in time

@zensaiyuki That sounds very nice! And completely unlike SQL.

@natecull it does sound unlike sql! which is why it’s a bit hard to explain!

@natecull i might just have to do a proof of concept or something. I dunno. a hello shrdlu maybe.

@natecull precisely, and to be clear I am not talking about implementing the whole thing in sql- just the storage and querying of facts about the world.

@natecull the agents within the world would need to be implemented some other way, responsible for adding facts

@zensaiyuki I wonder what Bonner and Kifer's Transaction Logic was:

<< This is a new logic for defining complex database transactions, and like GOLOG provides a rich repertoire of of operators for defining new databases in terms of old. These include sequence, nondeterministic choice, conditionals and iteration. >>

informatik.uni-leipzig.de/~bre , p 19

citeseerx.ist.psu.edu/viewdoc/

@zensaiyuki It is very weird how hard just modelling 'add this to database, then remove that from database' seems to be.

@natecull for particularly old papers you do have to adjust a little for all this stuff being invented from scratch. iverson’s sketchpad paper is a goldmine for these convoluted multiword phrases that now have single word descriptions

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!