Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет nancygold ([info]nancygold)
@ 2025-12-28 10:13:00

Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Настроение: contemplative
Музыка:TOOL - Schism - 80s Synth Pop AI Cover

Gemini Visual Simulation Capabilities for D&D
So I'm designing a hidden NPC to NPC relationship state for my D&D campaign.
At each milestone something happens, changing the relationships.
The players are expected to provide a narrative according to the context.

Such system is a bit involved, so I use Gemini to help understanding it.
https://gemini.google.com/app/ef68cf3d28a37d95
Still no idea if I can trust Gemini's assessment of how the system will behave.

E.g. it made an error in the rule logic (A → Y should be A → X):
If A → B, then (X → A implies X → B) and (A → Y implies X ↛ B).

EDIT: it was unable to one-shot an actual working video game out of it.
https://gemini.google.com/share/8757ab586d2a


PROMPT:
We want to evaluate a ruleset over a set of abstract entities.


Given entities A and B, we have the following possibilities:

1. A attracts B

2. B attracts A


Rule: If A attracts B, then all entities attracting A must also start attracting B, while all entities attracted by A must stop attracting B.



The entities relationships are arranged into a NxN binary matrix for the purpose of representing them in computer memory.


The speed of entity B approaching A is defined as the number of entities attracting A.


Given the described system, please produce a self contained html+js visual simulation, which visualizes both speed and attraction in a way easy for a human to assess. At each step the simulation applies the rule and then samples the output, converting it into easy to parse informative format(s).


This system is a fascinating variation of a directed graph propagation rule. Because the relationships are binary and the rules are deterministic, the system's behavior can be categorized into several interesting mathematical properties.

### 1. Convergence and Stability

The system **always settles** into a final state (a fixed point). It cannot enter an infinite loop of changing states.

* **Why?** The rule has a "monotone" component regarding the reachability of . When attracts , any entity that can reach through is forced into a direct relationship (). Simultaneously, entities that already attracts are barred from attracting .
* **The "Sink" Effect:** Because the rule effectively collapses multi-step paths (if and , then ) while pruning specific "local" loops, the system tends to simplify its connectivity over time until the rule no longer triggers any changes.

### 2. Time to Settle (Convergence Rate)

In most cases, the system settles in much less than steps.

* **Upper Bound:** Theoretically, the system will settle in at most ** steps**, as the propagation of the "attraction" property across the longest possible chain in the graph would take iterations.
* **Average Case:** For a random initial matrix of size , you will likely see the system settle in **2 to 4 steps**. As grows, the convergence time scales closer to or depending on the density of the initial "attraction" links.

### 3. Emergent "Clustering" Property

One of the most interesting properties of this specific rule is that it tends to create **exclusive clusters** or **hierarchies**:

* **Transitivity:** The first half of the rule (`X -> A -> B` implies `X -> B`) is essentially a manual enforcement of transitivity. This pushes the graph toward being a "Transitive Tournament" or a collection of "Sinks."
* **The Pruning Effect:** The second half of the rule (`A -> Y` implies `Y` stops attracting `B`) acts as a "competitive exclusion" principle. It prevents "middle-men" from maintaining a relationship with a target if their "leader" () already has that relationship.

### 4. Speed (In-Degree) as a Centrality Measure

In this system, "Speed" is effectively the **In-Degree** of a node in graph theory.

* As the simulation runs, you'll notice that "Speed" often polarizes. Some entities will end up with a speed of (everyone attracts them), while others drop to 0.
* The rule tends to move the system toward a state where a few "Super-Attractors" emerge, or the system completely disconnects.

### 5. Why no Infinite Loops?

For a system like this to loop (e.g., ), there would need to be a "negation" cycle that perfectly restores the initial conditions. However, the rule is an additive "force" that is only countered by the rule. Since the that are "pruned" are specifically those subordinate to (which is the source of the attraction to ), the system quickly exhausts the possible permutations of "who can attract whom" without creating the circular logic required for an infinite oscillation.



(Читать комментарии)

Добавить комментарий:

Как:
Identity URL: 
имя пользователя:    
Вы должны предварительно войти в LiveJournal.com
 
E-mail для ответов: 
Вы сможете оставлять комментарии, даже если не введете e-mail.
Но вы не сможете получать уведомления об ответах на ваши комментарии!
Внимание: на указанный адрес будет выслано подтверждение.
Имя пользователя:
Пароль:
Тема:
HTML нельзя использовать в теме сообщения
Сообщение:



Обратите внимание! Этот пользователь включил опцию сохранения IP-адресов пишущих комментарии к его дневнику.