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.

@jankoekepan Theoretically any Turing-complete language can do anything, but, ...

Follow

@natecull

Ruleset - check. Have evaluation by parameter call, no problem.

Changing rules - check. Erlang can reference functions lambda-style, among other things.

AI rule reference - check, depending for sanity's sake on how you implement the rules.

Save/load - check. Easy.

@jankoekepan Lambdas will not save you, unfortunately.

Can you save your lambdas to disk?

The AI needs to be able to read the rules as *knowledge*, not run a function and have {unknown things happen} to the game state.

You need a format *for* the game state, because you're going to need a lot of it; the AIs may be imagining different game states as they plan.

All these things can be done, but they fall into designing a language, and possibly an emulator for that language, not just coding.

@jankoekepan I understand that most of these requirements are not present in most current games.

They're what I personally want, however.

@natecull OK, so you want to build a DSL. Any language must then be evaluated on its ability to represent such a DSL as a composition of its primitives.

@jankoekepan Yes! That's exactly what I need.

The need to represent a DSL succinctly in the core grammar/syntax of the language, unfortunately, rules out a LOT of languages because their core syntax tends to get in the way of building succint DSLs.

Lisp is about the only thing left standing.

@jankoekepan @natecull this conversation is fascinating.

I’m interested to see if you come up with something. I’ve dabbled here to and it’s the kind of thing where it’s fairly simple until it isn’t :)

@jbob @jankoekepan

A large motivation of this strange odyssey was my experience writing 'Planner' for Inform 7 ( inform7.com/extensions/Nate%20 ) which....

yeah, I just gave up on I7 after this because, the syntax of the language was just so absolutely hostile to what I was trying to do.

But the IF community got stuck on I7 and...

Well, maybe I'll just try again from scratch, this time in Node.js.

@jbob @jankoekepan

Inform 7 is like writing COBOL. Except a COBOL with half of Prolog attached, and the two halves glued together with FORTRAN.

It is a fascinating language but an infuriating one.

@jbob @jankoekepan

And *then*, the IF community wandered out into ChoiceScript and whatever Fallen London runs on and even less featureful web-based languages and platforms than I7 and I'm just over here a million miles away watching it all.

@natecull @jbob

I would still go with Erlang, because you can call a function by a set of references (say, to world state, rule state and AI state), and then retrieve the AI's actions as a function return value, while having things like matching patterns determine on the receiving end what should be done with the data received.

@natecull @jbob

I never got along with LISP syntax. Maybe I'd like it better if I could be bothered to write an indentation-based LISP dialect.

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!