claras_universe,
@claras_universe@ieji.de avatar

Does anyone here have experience with procedural text generation? I want to implement procedural descriptions for the planets in my game which are not toooo repetitive to read :o I read about Markov chains but I'm not sure how I can incorporate the different planet parameters, features, etc. And I'm also wondering what other methods there are^^

martijn,
@martijn@ieji.de avatar

@claras_universe I think you can make a grammar with nrtk and use the generate function. You put in some words to form your basic sentences in the grammar, you throw in your variables, and use the generate feature to write a text. https://www.nltk.org/howto/generate.html

Requires less training data, might be accurate enough. And you can for example combine it with pre written text too.

I have had computational linguistics as a hobby. https://github.com/martijndeb/haxe-linguistics 😏

claras_universe,
@claras_universe@ieji.de avatar

@martijn thanks for the tip! I'll look into that c:

martijn,
@martijn@ieji.de avatar
claras_universe,
@claras_universe@ieji.de avatar

@martijn AAAH kinda I have no idea xd It looks good and is prolly enough for simple descriptions^^ I'll take a few steps back from that problem and look into it again in a few days, it's kinda hard to get starting since I wanna achieve a certain complexity, I just dunno where to start

cyningstan,
@cyningstan@mastodon.social avatar

@claras_universe I'm interested in this too; at the moment I'm just using simple boilerplate text with replaceable parameters. The best results I've managed so far are from having individual boilerplate sentences rather than whole texts, but that's still quite repetitive.

claras_universe,
@claras_universe@ieji.de avatar

@cyningstan I thought about using a Markov chain and training it with self-written descriptions. It will basically find out which word would be most likely to follow another word... But I'm not sure yet since this would prolly go more into AI direction and may need a lot of training data to work properly.

cyningstan,
@cyningstan@mastodon.social avatar

@claras_universe It's difficult to see how this would fit into your use case (or mine). You'd presumably want to make sure that all of the planet's attributes are included in the textual description.

claras_universe,
@claras_universe@ieji.de avatar

@cyningstan well yeah that's the thing XD it was just a thought

cyningstan,
@cyningstan@mastodon.social avatar

@claras_universe The other thing you could do is just use the description as flavour text alongside a table of planetary attributes. That way it wouldn't matter if certain stats were omitted. The text could maybe focus on the most distinctive feature, or something irrelevant altogether (like the original Elite from 1984, which fit a game and thousands of planets into 22kb of memory).

claras_universe,
@claras_universe@ieji.de avatar

@cyningstan if u look at my profile, I posted some screenshots in the past c:

cyningstan,
@cyningstan@mastodon.social avatar

@claras_universe That looks cool! Reading more on Markov chains I've got more of an idea where they might fit in, but I'm still not sure they're applicable here.

I once wrote a story generator that just put gramatically correct sentences together to make up surreal nonsense stories, a kind of automated Mad Libs. A Markov chain might have improved the sense of those stories (and made them less amusing).

The challenge would be integrating that and having your planet report still make sense...

cyningstan,
@cyningstan@mastodon.social avatar

@claras_universe A friend of mine used a similar method for name generation. It would read in text from a real language, and build up a table to determine what letters most likely came after what others in that language, to generate "words". Something like that would help for generation of planet names, especially if you want to mimic real-world (or existing fictional) languages.

Sorry for multiple replies, but I'm hitting the post size limit here.

cyningstan,
@cyningstan@mastodon.social avatar

@claras_universe I'm writing a referee/player aid for Traveller sci-fi TTRPG, and my initial solution would be for boilerplate sentences like "The planet's atmosphere is X." But that would be repetitive, so maybe a separate sentence for each value of an attribute would be the way to go. But I still don't see where a Markov chain would fit in.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • ComputerScience
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • cisconetworking
  • normalnudes
  • tester
  • ngwrru68w68
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines