The project in brief

Five castaways live on an island. Each one is played by a language model running on this PC (Ollama). Nobody tells them what to do: the program tells them what is true (their state, what they see, what is possible), and they decide. Their only goal: to survive as long as possible.

The tables marked real setting are read from the config.toml of the session that is running: they are always up to date.

Starting and options

cd theyliveinasim
python src/main.py

Ollama must be running, with the model given in [llm.jour] modele. The page opens at http://127.0.0.1:8765; the other devices in the house use the PC's address, for example http://192.168.1.20:8765.

OptionEffect
--rapidesmaller, faster model during the day ([llm.rapide])
--modele NOMforces an Ollama model for both day and night
--jours N · --seed Nstop after N days (without it, the session lasts until the last one dies) · random draw (same seed and same model: same starting world)
--vitesse 1|4|16starting speed (can be changed on screen)
--rejouer DOSSIERreplays a session recorded in runs/
--port N · --config FICHIERanother port · another settings file
--sans-navigateur · --quitter-a-la-findoes not open the page · stops by itself at the end

If another device cannot open the page, the cause is the Windows firewall. In PowerShell run as administrator: Set-NetFirewallRule -DisplayName "Python" -Action Allow -Profile Private

Reading the screen

AreaWhat it shows
MapThe whole island. Hover over a tile to find out what it is and what it allows. Click a character to follow them. The lit tiles around them are their range: golden within contact, bright within earshot, pale within sight.
BubblesCream: what they say. Cloud: what they think (the others do not hear it; “Thoughts” button).
Under their feetBlue bar: thirst. Green bar: hunger. A skull blinks when life is low.
Players (on the right)All the characters at a glance: what they are doing, with whom, thirst, hunger, life, energy, bag, thought. A click opens a window with every detail: main brain, stored memories, notebook, schedule, opinions of the others. Escape to close.
✨ Hiding placesShows the viewer where the hidden objects are. The characters themselves do not know.
Event feedEverything that happens. ★ = highlight. “Dialogues” and “Highlights” filters.
Trading Post, council, noticeboardItems of the day, latest vote, group work, crops, the island's reserves, model statistics.

The island and its terrains

A single map of hexagons, with no roads. In the south-west, the village: the Camp (shelters, fire, workbench, garden, well), the Library and the Trading Post touch one another, and the village can be improved (oven, smokehouse, huts, workshop, granary). The island is drawn in config.toml, section [carte]: one character per tile. The places (Camp, Forest…) are only the names of the regions of this map. real setting

Coordinates

Each tile has coordinates (x,y): x runs from the west (0) to the east, y from the north (0) to the south. They are written along the edge of the session's map and of the map above. The character always knows where they are: their prompt says “You are at (3,11), in the Camp (the place covers x 0 to 9, y 10 to 14)”. Everything they see is given with its tile (“water at (4,3), north-west, 2 tiles”), people too, and their MAP memory keeps the coordinates of what they have seen: they can go back there with aller_case, or tell them to someone.

Moving: aller_zone walks straight towards a place; aller_case walks straight towards a precise tile; se_deplacer moves 1 to 6 tiles in one of the six directions and stops at the water's edge. Walking is hardly tiring at all. The pace course can be chosen: you arrive sooner, but each tile run costs extra thirst and hunger (). A character only sees the others within sight: to see further, they must observer.

The body and death

Six gauges. Thirst and hunger drop by themselves, at a rate specific to each person. At zero, life melts away; at zero life, the character is dead for the whole session and their bag stays on their tile. real setting

All the actions

At each decision, the character receives only the actions possible at that moment, according to the terrain, their bag, their energy and the people in sight. real durations and costs

Food and objects

ObjectWhat it is for
goldbuying at the Trading Post, paying for books
water, flaskthe flask carries water far from the lake ()
woodmaking tools, cooking, building a shelter or a fire; can be sold
stone, ironmaking tools, building a fire; iron sells for a high price
seedsare planted in grass or sand

Carrying and storing

The bag has a limit: whatever exceeds it falls to the ground, on the tile. Gold and water do not count. Three ways to keep more: the backpack (bought at the Trading Post or woven at the workbench) to carry more; the chest (to be built) to store without limit, but open to anyone standing in front of it; the hiding place, secret as long as nobody searches the tile. real setting

Tools and crafting

Without a tool, there is no fishing, no mining, no cutting wood, no hunting. With bare hands, dead wood can be picked up at the foot of the trees and stones on the rock, slowly (about one try in two). This is the first rung: with wood and stones, tools are made at the workbench, provided one knows how (book, explanation, observation or experiment). The Trading Post does not sell any, and a single copy of each tool is hidden on the island. A tool wears out and eventually breaks; some serve as weapons. real setting

ToolEffect
fishing rodfishing much better
axecutting more wood; weapon
pickaxeiron and gold at the Mine; weapon
hoeharvesting more
spearhunting much better; weapon

The Trading Post

For gold, it sells provisions, water, seeds, and above all plans: buying a plan teaches how to make a tool, a flask or a construction; the object still has to be made by oneself. It never sells a crafted object. It buys back what is brought to it. Every morning at opening time, a new delivery: a few items drawn at random, in limited stock, with prices and qualities that change. Each purchase raises the price of the remaining items of the same type. real setting

The Trading Post's noticeboard: anyone can write a signed message on it, read by all. Nothing guarantees that it is true.

Books and knowledge

The rules of the game are not given to the characters. Each book is paid for in gold, is read in one hour, and its entire text (written by the engine with the real figures of the session) is added for ever to the reader's prompts. Only the reader knows it, as long as they do not tell. They can also enseigner it aloud. real setting

Hidden objects

Objects are hidden at the start in each place, on tiles drawn at random. fouiller explores the targeted tile and its neighbours. A few objects reappear every night. A character can also cacher their belongings: what is not in their bag can be neither stolen, nor snatched, nor seized by the council, but a searcher may stumble upon it. real setting

What they know, and how they learn it

The hand, the body, the craving for novelty

At the start, a character knows only their name, their gauges, that they drop, and the list of what they can attempt. They do not know what a berry gives back, what a fishing attempt costs, what can be cooked or built, nor what a stone is for. Everything is learnt:

HowWhat they learn
By livingEating shows them “your hunger went from 45 to 55 (+10)”; working teaches them what it costs in energy and what it brings in, according to their own attempts. It is recorded automatically in their OBJECTS memory.
By experimentingThe experimenter action combines 1 to 4 objects from their bag, where they are standing. If it is a recipe and the spot is suitable (near a fire, a workbench, on bare earth…), they discover it. Otherwise they learn that “it seems to go together but something is missing here”, that “perhaps an ingredient is missing”, or that nothing happens. Nothing is lost.
By watchingSeeing someone cook, craft or build leaves a perception (“I saw Bastien grill a fish with 1 fish and 1 wood, near a fire”). Nothing is learnt automatically: it has to be remembered, then tried oneself.
By listeningIn conversation, expliquer allows a long explanation (100 words): a book, a recipe, a route, told in one's own words. The other keeps only what they choose to remember, and can only do it after having tried it.
By readingEach book teaches precise recipes (table of books); Rules of the Island also gives the exact figures.
No automatic transfer between characters. Only speech passes from one head to another: no book text copied, no recipe handed over automatically, no promise or rule displayed in their place. The one who listens decides what they remember (“retenir”) and where they store it (map, people, objects, knowledge). What one lives oneself (eating, working, trying) is measured by one's own senses.

What they know how to do forms their know-how, kept for the whole session. The “what you can reach” block and the choice of a project only concern this know-how.

The progression tree

Everything is built step by step, and almost nothing is obtained alone. Wood and stone make a fire; at the fire one grills and makes soups. A piece of knowledge (a book, or someone who teaches it) and stones turn the fire into an oven: stews and pies, the most nourishing dishes. Another piece of knowledge allows the smokehouse: provisions that keep for five days. Each character sees in their prompt a block “WHAT YOU CAN REACH”: the next steps, what they give, and for each one what is missing (objects, knowledge, place) and where to find it, if they know. They learn what a thing costs by doing it, or by watching someone do it. real setting

Cooking recipes

What rots

Every hour, each food item has a chance of rotting, in the bag as well as in a hiding place or a chest. The duration shown is the average. Nothing rots in a granary.

Dangerous beasts

They prowl in their place and are visible on the map (circled in red). A beast only attacks someone who is alone next to it; as soon as two people are close, it moves away. After a bite, it keeps its distance for a while. At night, it may go for anyone sleeping outside, without shelter. It can be confronted: strength counts energy, life, a weapon (spear, axe, pickaxe), the knowledge of the bestiary and above all those who lend a hand. Once killed, it leaves meat and a hide. real setting

Day and night. From 08:00 to 17:00, a beast attacks with only 30% of its ferocity ([betes_regles] jour). From dusk to morning, it is at full strength, and the wolf stalks anyone who is alone. A torch held in the hand makes it back away, then eventually burns out.

What strengthens: healing, morale, energy, speed

Some objects do more than nourish. real setting

Growing and building

A seed is planted on grass or sand, where one is standing (the tile becomes garden soil), it is watered, and harvested the next day. Anyone can harvest someone else's plot, and it shows. Building is done on grass or sand. real setting

Group work

Someone launches the call, the others join them at the same spot. The gain goes to the one who launched it: it is up to them to share, or not. If someone drops out of the group, everything fails. real setting

Talking, trading, promising

In a conversationWhat it does
parlera line. Each word costs speech.
proposer_echangeobjects for objects, on both sides. The other accepts, refuses or makes a counter-offer. The trade is made hand to hand.
proposer_rdva time and a place; if it is accepted, both schedules record it, and the game says who came.
proposer_ensembledoing something as a pair, straight away: a place and a goal. If the other accepts, the conversation stops and they set off side by side. This is what turns an agreement into an act.
expliquera long explanation told in one's own words (100 words): a book, a recipe, a route. The other keeps only what they remember.
promettrea word given. Nobody records it for them: each one remembers it if they wish. If it is a vote, the council shows in front of everyone whether it was kept or betrayed.
conclureending the conversation.

Those within earshot hear everything. As long as a character does not know a name, they see “the man in red” or “the woman in purple”. Of a bag, only what is carried in the hand can be seen: tools and flask. One can work while talking.

Stealing and fighting

One can steal from someone who is asleep or busy: an object is taken at random from their bag. The victim and the witnesses may notice. One can fight: the stronger (endurance, energy, health, weapon, luck) wounds the other and snatches an object from them; both are wounded and one can die of it. real setting

The evening council

Every evening, those who are at the Camp vote aloud: for someone present, who receives the ration, and against anyone, who must give an object to the elected one. If there are not at least two people at the Camp, everyone loses energy. real setting

The rules of life

When voting, each one can propose a rule for the group, in their own words (sharing, theft, work, sleep, vote…). Those present vote on it at once, yes or no. An adopted rule is recalled in everyone's prompt, with the name of its author and of those who voted for it. The game does not enforce it: it is up to the characters to see who follows it, and to decide what to do with those who flout it. They are displayed in the “Trading Post, council and noticeboard” panel.

The characters

A name and some measurements, nothing else. Files: personnages/*.json. real setting

Their head and their night

To save their attention, part of the information is folded away: each one chooses, when reflecting or at night, the 4 blocks they keep in front of their eyes (consumption and reserves, what they can reach, their objects, the Trading Post…). They can also set themselves a project: the game then works out what is missing, where it comes from and the time that their own attempts suggest.

The page 🧠 How they think explains it with diagrams and shows the latest real prompt of each one. In short:

What the eyes and the body record

The game gives no advice and calculates nothing in their place. It hands them raw observations, as a human would have. It is up to them to decide what they keep: everything fades on waking, except what they have noted down or stored.

The size of the prompts

The model reads at most 10,240 tokens. Beyond that, it cuts the beginning of the prompt without warning: the rules and the memory. Three protections: before each call, by day as by night, the size is estimated and the optional blocks are folded away; repeated news is said only once (“× 40”); and if the model still reads much less than expected, a line [contexte] ATTENTION appears in the console log.

The size is estimated on the text alone (0.34 token per character, measured). The JSON schema does not count: it constrains the answer, the model does not read it. Until 26 November, it was wrongly counted, and blocks were folded away needlessly (349 times in the session “The island without fishermen”).

The body also says when an action has served no purpose: drinking without being thirsty returns “that brought you nothing”. And the morale gauge of the last one alive says that there is nobody left, instead of demanding an impossible company.

The language model

One call per decision, per line, per vote, and one per character each night. The answer is a JSON object constrained by a schema: one variant per action possible at that moment. real setting

Safeguards

What limits loops and abuses without dictating any conduct. real setting

Project files

FileRole
config.tomlall the settings: map, gauges, prices, chances, durations, model, safeguards
personnages/*.jsonthe five sheets: name, age, endurance, thirst and hunger per hour, memory sizes, starting bag
src/main.pylaunch: reads the options, starts the server and the simulation
src/moteur.pythe engine: time, gauges, actions, conversations, council, night
src/carte.pythe map: terrains, regions, distances, what each terrain allows
src/contexte.pyeverything the model reads: basic rules, day, conversation, night and vote prompts, texts of the books, answer schemas
src/llm.pythe call to Ollama, and the fake test model
src/serveur.pythe local web server and the live broadcast
src/journal.py · src/raconter.pyrecording of the session · account in text
viewer/index.htmlthe session screen
viewer/wiki.html · viewer/cerveau.htmlthis page · the page about their brain
src/sessions.pyrebuilds each session from its folder: summary, characters, day by day, gossip, and the “film” (acts, scenes, voice-over)
src/stats.py · viewer/stats.htmlthe statistics of a session (the current one, or another with stats.html?d=<dossier>)
viewer/parties.html · viewer/partie.htmlthe list of sessions · the page of one session (session.html?d=<dossier>)
viewer/sessions.jsonthe notes written by hand for each notable session: title, question asked, changes, verdict, problems and solutions
viewer/journal.html · viewer/histoire.htmlthe logbook articles
rapports/*.mdthe analysis reports, displayed in the page of their session

Recorded sessions, replay

Each session creates a folder runs/<date>_seed<N>/:

FileContents
flux.jsonleverything that was displayed: used to replay the session identically
llm/J1.jsonl…each model call: full prompt, answer, duration, tokens
journal/the events, day by day
etats/the complete state of the world every 30 simulated minutes
config.tomlthe settings used for this session
python src/main.py --rejouer runs/<dossier>

One page per session

The page 🎬 Sessions lists all the sessions and shows how long the castaways held out each time. Each session has its page, built from its files:

A session becomes “notable” as soon as it has an entry in viewer/sessions.json. A session lasts until the death of the last castaway.

All the settings

The complete contents of the config.toml of the current session, section by section. real setting

Improving their behaviour

The table “what is observed → where to act” is on the page 🧠 How they think, section 8, with their live prompt in section 9. The rule of the project: first correct what they know and see, then what is possible, and remove choices only as a last resort.