Neural narratives in Python #3

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1) in which the characters are isolated in terms of memories and bios, so no leakage to other participants like in Mantella. Here’s the GitHub repo.

Dialogues with the AI are working great. I love how the inclusion of world, region, area and even location information in the prompt to the large language model colors the dialogue. I decided to go one step further, and implemented automatic generation of worlds based on a few notes from the user, of regions from a world, of areas from a region, and of locations from an area.

Soon enough, I will modify my code to generate at will characters belonging to an area or a location, so I expect that their backgrounds and general mindset will be colored heavily by those influences.

Here are some examples of worlds, regions, areas, and locations generated through this system:

Arctoria (world)

Arctoria is a vast world that mirrors the grandeur and sophistication of the Roman Empire. The landscape is dotted with majestic cities, each a center of art, culture, and learning. The architecture is reminiscent of ancient Rome, with grand amphitheaters, towering aqueducts, and intricate mosaics adorning the walls of temples and villas. The climate is Mediterranean, with warm, dry summers and mild, wet winters.

The geography of Arctoria heavily influences daily life. The fertile valleys support an agricultural economy, while the mountain ranges serve as natural barriers and strategic defensive positions. The extensive network of roads and sea routes facilitates trade and communication across the empire.

However, Arctoria is not just a mundane world. It is a place where the boundary between reality and fantasy blurs. Some individuals are born with extraordinary powers that can shape the world around them. These powers can manifest as offensive capabilities, healing abilities, the creation of illusions, or even summoning monsters from other dimensions. Yet, these gifts come with a terrible price. If a power-bearer is murdered, their abilities can be stolen by the killer. This makes possessing such powers extremely dangerous, and those born with them often live in fear and secrecy.

The appearance of interdimensional monsters adds another layer of unpredictability to life in Arctoria. These creatures can emerge anywhere, at any time, and their intentions are often unclear. Some are benign, content to observe this new world. Others are hostile, causing destruction and chaos wherever they appear.

Arctorian society is advanced and values knowledge, honor, and survival. The empire is ruled by a powerful senate, with a complex system of laws and governance. The dominant language is Arctorian, a language closely related to Latin, and the arts, including sculpture, painting, and literature, are highly valued. Magic is not widely understood in Arctoria. It is viewed with a mixture of awe, fear, and suspicion. Those with powers are often treated as outcasts, and their abilities are seen as more of a curse than a gift.

The dominant religion is the worship of the pantheon of gods, who are believed to oversee all aspects of life, including the bestowal of magical powers.Social classes in Arctoria are determined by birthright, wealth, and merit. The nobility hold significant power, but there is mobility within the social structure for those who display talent and ambition.

Non-human species are rare in Arctoria, but they do exist. These beings, often hailing from other dimensions, are viewed with suspicion and fear, and interactions between humans and non-humans are fraught with tension.

In essence, Arctoria is a world where the grandeur of ancient Rome meets the unpredictability of fantasy. It is a place of beauty and danger, where the mundane and the magical coexist uneasily. The struggle for power, both political and magical, drives much of the conflict in this fascinating world.


Erosia (world)

Erosia is a world where the roles of men and women are flipped when it comes to sexual promiscuity and propriety. Women in Erosia are utter perverts, constantly dominated by their need to have sex, even just for fun. This leads them to become predatory. The males of Erosia have to guard themselves to avoid getting abused, raped, or at least inconvenienced by females. Long-term relationships between men and women are hard because the women are extremely promiscuous.

The landscape is dotted with fortresses and safe havens for men to protect them from roving bands of lusty women. Major civilizations are female-dominated, with women holding most positions of power due to their voracious sexual appetites. Men are seen as the ‘weaker’ sex. Society values sexual conquest and pleasure above all else.

Technologically, Erosia is medieval, with castles and walled cities built for protection more than anything. The ruling entities are matriarchal monarchies and queendoms. Ongoing conflicts exist between different factions of powerful women vying for control and access to the most desirable men. The main resource is a rare plant that suppresses female libido, giving men a way to protect themselves. The dominant religion worships a goddess of love and lust. Social classes are determined by birthright and sexual prowess.

Non-human races like nymphs and succubi exist and ally themselves with human females in their pursuit of male conquests. Racial tensions are low as most races share the same sexually aggressive females.


Aurelia (region of Arctoria)

Aurelia is a region of grandeur and sophistication, reflective of the high fantasy and historical elements of its parent world. It is characterized by its rolling hills and fertile valleys, with the climate being predominantly Mediterranean, featuring warm, dry summers and mild, wet winters. This supports a prosperous agricultural economy, with vineyards and olive groves stretching as far as the eye can see.The inhabitants of Aurelia are a proud and cultured people, valuing art, education, and honor above all else. They have a rich tradition of sculpture, painting, and literature, with many of their works inspired by the pantheon of gods they worship. These deities are believed to oversee all aspects of life, including the bestowal of magical powers upon certain individuals.

The architectural landscape of Aurelia is dominated by grand amphitheaters, towering aqueducts, and temples adorned with intricate mosaics. The cities are designed in a manner that mirrors the splendor of ancient Rome, with wide avenues and public spaces that encourage community interaction.

The governance of Aurelia is overseen by a powerful senate, similar to that of the Roman Republic. This body of elected officials is responsible for the creation and enforcement of laws, as well as the overall administration of the region. Despite the semblance of democracy, the social hierarchy is largely determined by birthright, wealth, and merit, with the nobility holding significant power.

Aurelia is known for its advanced craftsmanship, particularly in the production of fine wines and olive oil. These goods are highly sought after, both within the region and beyond. The economy is further supported by a robust network of roads and sea routes, facilitating trade and communication with neighboring realms.

Despite its prosperity, Aurelia is not without its challenges. The region is often threatened by interdimensional monsters, whose appearances are unpredictable and intentions unclear. To defend against these threats, Aurelia maintains a formidable military force, known for its discipline and tactical prowess. Furthermore, individuals born with magical powers are viewed with a mixture of awe, fear, and suspicion, often leading lives of secrecy and isolation.

In essence, Aurelia is a region where the grandeur of ancient Rome meets the unpredictability of fantasy, creating a unique blend of beauty, danger, and intrigue.


Venustria (region of Erosia)

Venustria is a lush, fertile region known for its rolling hills, dense forests, and winding rivers. The climate is temperate, with warm summers and mild winters, making it an ideal environment for agriculture and natural beauty.

The inhabitants of Venustria are primarily human, with a culture that values sensuality, pleasure, and artistic expression. Women hold most positions of power, and society is structured around female dominance. Men are prized for their beauty and sought after as companions and lovers. Relationships are often fluid, with long-term commitments being rare.

Venustria is governed by a council of powerful women, each representing different factions within the region. These factions include the Aesthetes, who value art and beauty above all else; the Agrarians, who control the region’s fertile farmlands; and the Huntresses, skilled warriors who protect the land from external threats.

The region is known for its stunning architecture, with graceful spires, intricate carvings, and lush gardens adorning the cities and towns. The arts are highly valued, with music, dance, and theater being popular forms of entertainment. Iconic styles include flowing, diaphanous garments, intricate jewelry, and ornate body paint.

While Venustria is not currently at war, there are ongoing tensions with neighboring regions over resources and territory. The region’s main resource is a rare flower that, when properly cultivated, can enhance sensual pleasure. This flower is highly sought after, both within Venustria and beyond.

The Venustrian military is known for its skilled female warriors, who are trained in archery, swordplay, and hand-to-hand combat. The region’s defenses are further bolstered by natural barriers, such as dense forests and treacherous mountain passes.

Social hierarchy is determined by a combination of birth and achievement, with those possessing great beauty, artistic talent, or military prowess rising to the top. Men have the opportunity to elevate their status through their skills as lovers and companions, but ultimate power rests in the hands of women.

Spiritually, Venustria worships a goddess of love and sensuality, with elaborate temples and rituals dedicated to her worship. The region’s inhabitants believe in indulging in the pleasures of the flesh and celebrating the beauty of the natural world. This belief system permeates every aspect of Venustrian life, from art and architecture to politics and personal relationships.


Valoria (area of Aurelia)

Valoria is a region characterized by its lush, rolling hills and fertile valleys, reminiscent of a Mediterranean paradise. This area is blessed with a warm, dry summer and mild, wet winter, making it an ideal location for agriculture. Vineyards and olive groves stretch as far as the eye can see, contributing to a prosperous economy.

The inhabitants of this area are a proud and cultured people, valuing art, education, and honor above all else. They have a rich tradition of sculpture, painting, and literature, with many of their works inspired by the pantheon of gods they worship. The deities are believed to oversee all aspects of life, including magical powers bestowed upon certain individuals.

Valoria is dominated by grand amphitheaters, towering aqueducts, and temples adorned with intricate mosaics. The cities are designed to mirror the splendor of ancient Rome, with wide avenues and public spaces encouraging community interaction. Despite the semblance of democracy, the social hierarchy is largely determined by birthright, wealth, and merit, with the nobility holding significant power.

The area is known for its advanced craftsmanship, particularly in the production of fine wines and olive oil. These goods are highly sought after, both within the region and beyond. The economy is further supported by a robust network of roads and sea routes, facilitating trade and communication with neighboring realms.

Despite its prosperity, Valoria is not without its challenges. The region is often threatened by interdimensional monsters, whose appearances are unpredictable and intentions unclear. To defend against these threats, Valoria maintains a formidable military force, known for its discipline and tactical prowess. Individuals born with magical powers are viewed with a mixture of awe, fear, and suspicion, often leading lives of secrecy and isolation.


Silkwraft Barrens (area of Venustria)

In the heart of the region lies a unique expanse, the Silkwraft Barrens, a place that defies the lush, fertile stereotype of its surroundings. This area is characterized by its vast, open grasslands interspersed with patches of dense, almost impenetrable forest. The terrain is mostly flat with occasional rugged hills, giving it a sense of openness and freedom, a stark contrast to the claustrophobic density of the forests.

Despite the seeming barrenness, the Silkwraft Barrens is rich in unique resources. The most notable is the Silkwraft flower, a rare blossom that thrives in the open grasslands. This flower is coveted for its ability to enhance sensual pleasure and is a key component in the region’s most potent love potions. The area also supports a variety of fauna, including the Swifttail deer, known for their speed and grace, and the elusive Shadowlynx, a creature of beauty and danger whose presence adds a thrilling edge to any journey through the Barrens.

The Silkwraft Barrens is governed by the Sensates, a faction of the council who believe in the power of the senses and the pursuit of pleasure. They maintain a delicate balance, ensuring the preservation of the Barrens and its resources while also exploiting its bounty. They have established a network of trade routes, both by land and river, which serve as lifelines for the communities residing in the Barrens. However, these routes can be treacherous, particularly during the stormy season when the rivers swell and the paths become muddy and impassable.

The Barrens is steeped in mystical beliefs, with many stories and legends woven around the Silkwraft flower and the Shadowlynx. The Sensates have built grand temples dedicated to these legends, where elaborate festivals and rituals are held to honor them. These events are a spectacle of color, music, and dance, a celebration of life and pleasure that is at the heart of the region’s culture.

Despite its open terrain, the Silkwraft Barrens holds many secrets. Ancient caves honeycomb the rugged hills, rumored to hold untold riches and dangers. There are also whispers of hidden groves deep within the dense forests, places of power where the line between the physical and the mystical blurs. These mysteries add to the allure of the Barrens, drawing adventurers and dreamers alike to its wild beauty.


The Whispering Gallery (location of Valoria)

The Whispering Gallery is a sprawling, ancient cavern system located beneath the verdant hills of the region. It is a place of mystery and wonder, where the echoes of the past seem to linger in the cool, damp air. The entrance to the caverns is marked by a towering archway of weathered stone, adorned with intricate carvings that hint at the secrets hidden within.

Inside, the caverns are a labyrinth of winding tunnels and vast chambers, lit by flickering torchlight and filled with the soft, eerie whispers that give the gallery its name. The walls are adorned with ancient frescoes and mosaics, depicting scenes of heroism and tragedy, love and loss, and the eternal struggle between good and evil. The air is thick with the scent of damp earth and the tang of metal, a testament to the rich veins of ore that run through the rock.

The Whispering Gallery is home to a secretive order of monks, known as the Keepers of the Whisper. These monks are charged with protecting the caverns and the treasures they hold, including rare and precious gems, metals, and ancient artifacts. They are also skilled in the art of echolocation, using the whispers of the gallery to navigate its twisting passages and communicate with one another.

Despite its beauty and wonder, the Whispering Gallery is not without its dangers. The caverns are prone to sudden rockfalls and collapsing tunnels, and the deeper chambers are home to strange and terrifying creatures that have evolved in the darkness. Some say that the whispers themselves can drive a person mad, luring them deeper and deeper into the darkness until they are lost forever.

Today, the Whispering Gallery is a place of pilgrimage and learning, where scholars and adventurers alike come to unravel its mysteries and seek out its treasures. But it is also a place of danger and treachery, where only the bravest and most cunning can hope to survive.


The Velvet Grove (location of Silkwraft Barrens)

In the heart of the open grasslands lies a unique expanse, a place known as The Velvet Grove. This location is characterized by its lush, dense forest that seems to breathe with life, a stark contrast to the vast openness surrounding it. The trees here are ancient, their trunks thick and their branches reaching towards the sky like the desperate pleas of a lover. The air is heavy with the scent of dew and moss, and the ground is carpeted with soft, velvety grass that seems to caress the skin of those who walk upon it.

The Velvet Grove is home to a variety of fauna, most notably the Swifttail deer and the elusive Shadowlynx. These creatures add a sense of danger and thrill to any journey through the grove, their presence felt more than seen. But the true guardians of this place are the Sensates, a faction who believe in the power of the senses and the pursuit of pleasure. They maintain a delicate balance, ensuring the preservation of the grove and its resources while also exploiting its bounty.

The grove is rich in unique resources, the most notable being the Silkwraft flower. This rare blossom thrives in the dense forest, its petals shimmering with a soft, ethereal glow. The flower is coveted for its ability to enhance sensual pleasure and is a key component in the region’s most potent love potions. But harvesting the flower is no easy task, as the Shadowlynx are known to guard them fiercely.

Despite its beauty, the Velvet Grove holds many dangers. The forest is home to a variety of poisonous plants and venomous creatures, making it a treacherous place for the unprepared. The dense foliage and winding paths can easily disorient even the most experienced traveler, and the Sensates are not known for their mercy towards trespassers

.Yet, despite these dangers, the Velvet Grove is a place of peace and serenity. The air is filled with the soft whispers of the leaves, the gentle trickle of water, and the occasional cry of a Swifttail deer. It is a place where the line between the physical and the mystical blurs, where the senses are heightened and the soul is laid bare. It is a place of beauty and danger, of pleasure and pain, of life and death.