Giter VIP home page Giter VIP logo

Comments (7)

peterohanley avatar peterohanley commented on July 20, 2024 1

I've made some progress.

start_moving(C, S, T) :-
	character(C),
	location(S),
	location(T),
	character_location(C, S),
	movement_possible(S, T),
	\+ moving(C, _, _).
start_moving(C, S, T) :! +moving(C, S, T),
	-character_location(C, S).
start_moving(C, S, T) :~ "$C left $S for $T.".

finish_moving(C, S, T) :-
	moving(C, S, T).
finish_moving(C, S, T) :!
	-moving(C, S, T),
	+character_location(C, S, T).
finish_moving(C, S, T) :~ "$C arrived at $T.".

ambush(C, T) :-
	moving(C, _, T).
ambush(C, T) :! true.
ambush(C, T) :~ "$C was ambushed by bandits on the way to $T.".

got_lost_while_moving(C, L) :-
	moving(C, _, _),
	location(L). % C goes to a random place
got_lost_while_moving(C, L) :! -moving(C, _, _), % safe because you can only be moving once.
	+character_location(C, L).
got_lost_while_moving(C, L) :~ "$C got lost and washed up at $L.".

I have a copy of https://github.com/Erdwolf/prolog that I've updated to compile, and which I'll modify to accept the above syntax. :- is like normal prolog, :! says how to modify the environment if this action is chosen, and :~ is my current plan for output. I will allow multiple :- and :~ clauses and if I think of a coherent use case for multiple effects allowing that will be easy too. This will allow a moving(C, Itinerary) multistep moving action that goes through locations rather than beelining, if necessary.

Actions are divided into starts and ends to allow interaction in the middle, like the ambush and getting lost possibilities here.

I have some ideas about choosing which action to take that I'll write up once they're more fleshed out.

from 2018.

enkiv2 avatar enkiv2 commented on July 20, 2024

from 2018.

shakna-israel avatar shakna-israel commented on July 20, 2024

desires_interaction would probably just need a series of weights, and then Prolog can handle it easily.

What motivates the character? Money? Hoarding everything?


I see a few things that would be easier, like dialogue, by using an embedded Prolog. That way, if there's no easy way to use the Prolog solver, you can just step back into the host language.

Say PicoLisp. It could handle generating the output file, and running a word count on it, to check for when the story should cease being generated.

from 2018.

enkiv2 avatar enkiv2 commented on July 20, 2024

from 2018.

peterohanley avatar peterohanley commented on July 20, 2024

Yeah, prolog rules determine the plot and actions and the host language will fill in descriptions and dialogue. Characters are motivated by finding the grail, which they do by finding enough kinds of information about , which they can get in a number of different ways or by taking from other characters. This plot is concrete enough that it should be practical. I considered an evil overlord plot but foiling plans seems more abstract. Of course, now that I seriously consider it I can think of ways to state it, but I'm sticking with Grail Hunters in the Jungle.

from 2018.

shakna-israel avatar shakna-israel commented on July 20, 2024

Grail Hunters sounds awesome, and there's a lot to play with narrative-ly there. Easy to get several radically different outcomes.

from 2018.

enkiv2 avatar enkiv2 commented on July 20, 2024

from 2018.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.