NaNoGenMo / 2022

National Novel Generation Month, 2022 edition.
51 stars 0 forks source link

Science Fiction Novel >50K words, pdf + code in specific language for novel generation #53

Open JNovGen opened 1 year ago

JNovGen commented 1 year ago

An attempt to generate a SF novel with a dedicated language and environment based on Markov chain. I used NovGen to execute the code I wrote [https://zzulian.itch.io/novgen]. So I designed a small Science-Fiction world [https://github.com/JNovGen/SpaceMercenaryNovel/blob/main/storyworld.jpg] and the computer has chosen a path in this world to generate a story. The generated novel can be found here in PDF : [https://github.com/JNovGen/SpaceMercenaryNovel/blob/main/lemercenairedelespace.pdf] The novel contains 50690 words and 116 chapters

The source code : [https://github.com/JNovGen/SpaceMercenaryNovel/blob/main/lemercenairedelespace4.xml]

To improve the novel, I have to grow the story world, so to grow the set of possibilities. To design the story world I have also to set its owns rules. This way It permits to make different novel templates, the story model is not hard-coded.

Sorry the novel is in French, but here a short extract in English:

_The pilot started the descent procedure in the stratosphere, the ship crossed thick clouds. The heat shield protected the ship until its final approach. The ship flew over deserted areas, while a skyscraper surrounded by flimsy houses loomed on the horizon. A landing platform was attached to the side of the skyscraper and the ship landed safely. The pilot got off the ship and was greeted by a guard who accompanied him into the tower. The guard tapped on a terminal and they entered an elevator. The elevator stopped on the top floor of the tower. They entered a large room, near a bay window, a man sitting in an armchair looking out over the desert. He didn't bother to turn around and started talking. Turning briefly, he pointed to the magnetic card on a long desk. The pilot took the map and walked out of the spacious office. He returned to his ship, inserted the magnetic card, and coordinates appeared on the screen. The ship took off and moved away from the tower.

The ship left the attraction of the planet and went towards the coordinates indicated by the magnetic card. An orbital station appeared in visual. The ship slowly approached the station, the pilot tried to contact the station but no one answered. The pilot docked the ship to the station. He opened the airlock and entered the station. He explored the place, the crew seemed to have left the place. He went to the laboratory. At the moment of placing an explosive charge, he heard a noise and turned around to avoid the assault of a small creature. He lost sight of it, set the timer for the charge and rushed to the exit. He hurried to his ship and the ship moved away from the station. A module on the station exploded and caused a chain reaction, the entire station shattered into small debris that quickly dispersed. The pilot entered new coordinates and the ship headed for the mercenary planet. The pilot began the descent procedure into the stratosphere and the ship passed through thick clouds. The heat shield protected the ship until its final approach. The ship flew over deserted areas, while a skyscraper surrounded by flimsy houses loomed on the horizon. A landing platform was attached to the side of the skyscraper and the ship landed safely. The pilot stepped off the ship and was greeted by a guard who accompanied him into the tower. The guard tapped on a terminal and they entered an elevator. The elevator stopped on the top floor of the tower. They entered a large room, near a bay window, a man sitting in an armchair looking out over the desert. He stood up and approached the mercenary. "Congratulations! The station that served as a clandestine laboratory has been destroyed. It goes without saying that you saw nothing in the station..._

pnprog commented 1 year ago

Hi,

Nice submission, but the source code is missing: only the XML database that was use as a resource to generate the novel is available. The actual source code to generate the data is apparently not available, and one has to purchase a closed source software to actually run the solution.

Is this entry really fit for NaNoGenMo? The entry looks more as an attempt to advertise a commercial software @dariusk

JNovGen commented 1 year ago

Hi @pnprog, maybe it needs more explanation : At First The code is not missing : https://github.com/JNovGen/SpaceMercenaryNovel/blob/main/lemercenairedelespace4.xml Yes the code uses XML syntaxe because it's easy to parse. (but any program is a kind of data), there are also condition in it : (extract from the xml: memoryCondition="crédits<2" nextNodes="pas assez de crédits" unique="false" variable="". Yes it's executed by a specific interpreter that is not free. Imagine If i did it in Visual Basic for example, will be the same issue. It's not mentionned that the code cannot be written with a proprietary language.

pnprog commented 1 year ago

Yes the code uses XML syntaxe because it's easy to parse.

It's not mentionned that the code cannot be written with a proprietary language.

Nice, can you share the specification of that language so that I can build my own interpreter and run your solution?

hugovk commented 1 year ago

Hi there! I think this would probably be okay, just like a Tracery grammar would be fine.

Tracery may be open source, but we've also had entries that use IFTTT, Excel and Word, all proprietary "backends".

NaNoGenMo is open to people writing code with all sorts of skills and skill levels, and "code" is often interpreted as freely as we define "novel".

Anyway, this entry was submitted outside November so this discussion is somewhat irrelevant. :)

JNovGen commented 1 year ago

I'm preparing to deliver a free interpreter without editor to inteprete this specific format, and deliver a formal grammar. That's right the submission is out the date, this way I will be ready for the next time.