NaNoGenMo / 2020

National Novel Generation Month, 2020 edition.
76 stars 0 forks source link

B1naryGh0sts #9

Open reakain opened 3 years ago

reakain commented 3 years ago

It was only a month ago I trawled through all the sad mecha table top rpg game entires for a sad mech game jam on itch, so I'm gonna see what I can do to with parsing and text injection to make a story that at least starts out fairly straightforward, but... eventually have some digital ghosts or echoes or memories start making noise in the text, and see what it comes up with.

Here's hoping I can even find some time to spend on this ;0;

--Update--- I think I missed the actual official time, but I made it just in time with like an hour to spare for my time zone, to nyeh. Of course, as I type this it's still compiling the final novel, but I know where it will be once finished.

I used Markovify to build new sentences from the sentences that matched a ghost's emotions. And each ghost had a word bank that would be depleted as it overwrote sentences it didn't like. Then I had multiple ghosts all reading and writing at once at different rates. So they were learning and rewriting from each other too.

My code is available here And the finished, rewritten text is here (The source story was a NaNoWriMo story I wrote in 2010 that was terrible)

pjfpotter commented 3 years ago

time! who needs time? oh. yeah right.

That sounds like a deeeply fascinating idea. I'm bang into binary ghosts. Have no idea how you would approach that. will follow with interest

reakain commented 3 years ago

Some notes from thinking about it while leading up to November: (so you can see my chaotic brain space thinking)

text injection, brief at first and then gaining in mass. Do I want injection or overwriting? Both?

I COULD USE MY ACTUAL SUCCESSFUL NANO AS A BASIS FOR INJECTION

tasks:

how will it build initial narrative?

how will it determine when to inject?

how will it determine what to inject?

DO WE WANT MAKE THE WHEN TO INJECT AND INJECTION TEXT CHOICE SYSTEMS HAVE A JOINED SYSTEM REWARD??? WHAT IS THE REWARD???

Do we wanna have multiple agents doing injection?? multiple agents all trying to communicate

or multiple agents trying to co-write a story? Each has different source text, so they key off each other based on what their source says should come next??? (this is an entirely different premise and should not have been counted)

ARCHIVE OF OUR OWN SOURCE CODE IS AVAILABLE AND FF.NET HAS AN API I CAN PULL A BUNCH OF ANGST SHIT TO LEARN FROM

this may be terrible and result in the bot getting really existential over bad (or good) fanfic porn... There's a lot of porn in the sad, feels, and angst tags...

https://pypi.org/project/ao3-api/

https://github.com/cjeller1592/NaNoGenMeOw get some clean text preview

https://github.com/dariusk/NaNoGenMo/issues/2 lots of useful info

https://emshort.blog/2018/10/16/mailbag-ai-research-on-dialogue-and-story-generation/

https://emshort.blog/2018/07/10/mailbag-world-simulation-plug-ins/

https://escholarship.org/uc/item/1340j5h2

my general plan is to have agents determining where to inject text or overwrite, and agents that are each trained on different source tags that will provide the insertion text, and have them be in teams of agents, where agents within a team get rewards that aligned with the team reward, and each team reward is counterbalanced so one team will lose reward if another gains, but have the competitive reward function still align back to an overall system state reward, so they don't just... overrun the text immediately

But I'll probably talk to my multi-agent systems prof about linguistics and different reward schemas to see what ideas he has. I know I want the text "erosion" to happen at a variable rate, but I'm not sure how best to define that either, but I'm hoping the teaming method might give a narrative to the erosion that's like... "several voices or echoes all clamoring to be heard"

Stefan Lee (OSU) is new faculty that does language processing!!

http://computationalcreativity.net/iccc2019/papers/iccc19-paper-6.pdf

maybe swarm approach?

model "ghosts" →

pjfpotter commented 3 years ago

Yes to all of this. I'm going to chew through all these links with giddy excitement.

reakain commented 3 years ago

and next giant note blob:

following the swarm approach idea for ghosts:

each ghost aligned with an emotion, and set against another emotion

words are categorized to match an emotion (or null)

words are "graded" for the strength of the emotion

ghost collects all words that align with it's emotion (or null emotion)

if "emotion" of sentence is against ghost, and "power" is matched to ghost's highest power statement, overwright or insert rebuttal to statement

run each statement through each agent in swarm to get result?

maybe each sentence they can try to overwrite, and get "rewards" based on how they change the sentence?

Ghosts are the embodiment of emotion, a response to their death and what was left undone. They grow in strength in relation to their emotion, and when they're reminded of their pain, they use the power of their emotions to strike out - to change the physical world... Or, perhaps, for those trapped in the noise, to change the data.

emotions:

happiness, sadness, fear, anger

https://core.ac.uk/download/pdf/82228457.pdf

https://www.nature.com/articles/s41562-019-0533-6

Adoration, Amusement, Anger, Awe, Confusion, Contempt, Desire, Disappointment, Distress, Fear, Interest and Sadness

https://wndomains.fbk.eu/wnaffect.html

https://github.com/kevincobain2000/sentiment_classifier

https://github.com/clemtoy/WNAffect

https://www.researchgate.net/publication/225961081_A_Linguistic_Interpretation_of_the_OCC_Emotion_Model_for_Affect_Sensing_from_Text

power:

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4525695/

https://ccc.inaoep.mx/~villasen/bib/Identifying Expression of Emotion in Text.pdf

https://wndomains.fbk.eu/wnaffect.html

https://github.com/kevincobain2000/sentiment_classifier

https://github.com/clemtoy/WNAffect

reakain commented 3 years ago

First comment has been editted to link to completed source! (It's WAS within the time for myyyy timezone, but I had some last minute issues with python not wanting to write it out to a file, so that's a fun adventure I'm still fighting with)

I did put a standing link to where the novel will be once python lets me actually print. I can see it generating on console print statements, but it wont go in the file =[

Thank you so much for running this!

hugovk commented 3 years ago

The rules do say we use GMT, but we'll let you off this time :)

If you're having difficulty writing to file, but it's printing to console, you could try something like this:

python main.py > out.txt
reakain commented 3 years ago

<3 Thank you! I eventually got it to properly generate! (In the most inefficient manner, but ehh, details!) And all links should be functional~