Story telling

From LiteratePrograms
Jump to: navigation, search

This program is under development.
Please help to debug it. When debugging
is complete, remove the {{develop}} tag.

AutoAdv as an algorithm of automatic story telling.

It is based on an analogy with fractal landscape generation.

[edit] Theory behind the AutoAdv algorithm

Let \mathcal{E} be a set of at least two elements, two of them named:

  • the initial element I_\mathcal{E}
  • the terminal element T_\mathcal{E}

Let \mathcal{P}(\mathcal{E}) the set of subsets of \mathcal{E}.

Let E\in\mathcal{P}(\mathcal{E}), τE is called an timing of E when it's an application from E into I\!\!R^+ so that:

  • if I_\mathcal{E}\in E, \tau_E(I_\mathcal{E})<\min(\tau_E(x),\forall x\in E)
  • if T_\mathcal{E}\in E, \tau_E(T_\mathcal{E})>\max(\tau_E(x),\forall x\in E)

When (X_1, X_2,\ldots,X_N) is a vector of N elements of \mathcal{P}(\mathcal{E}), and (\tau_1, \tau_2, \ldots, \tau_N) a vector of N associated timings (i.e. \forall 1\leq n\leq N, \tau_n is a timing of Xn), an augmentation of \left((X_1, X_2,\ldots,X_N),(\tau_1, \tau_2, \ldots, \tau_N)\right) is \left((Y_1, Y_2,\ldots,Y_{N+K}),(\tilde\tau_1, \tilde\tau_2, \ldots, \tilde\tau_N, \tau_{N+1},\ldots,  \tau_{N+K}\right), where:

\forall 1\leq n\leq N,& X_n \subset Y_n\\
\forall x\in X_n,& \tau_n(x)=\tilde\tau_n(x)\\
\forall y\in X_n\setminus Y_n,& \tilde\tau_n(y)>\max(\tau_{n}(x), \forall x\in X_{n})\\

Download code