GithubHelp home page GithubHelp logo

xenakis's Introduction

Linaia-Agon

This is a simulation in R (v3.6.0) of the game-theoretic musical composition Linaia-Agon by Iannis Xenakis.

The piece consists of four zero-sum game matrices: Choice of Combats, Combat α, Combat β, and Combat γ.

The piece is based on a mythical duel between the musician Linus (on trombone) and the god Apollo (on horn and/or tuba). Musically, moves in each game correspond to musical notes (Choice of Combats) or a 20-bar measure of music.

First the players play Choice of Combats, where their moves are made into a sequence, e.g. (α, β), (γ, γ) → (α, β, γ, γ).

Choice of Combats

Players then play the other combats in this sequence. In each game, the highest-scoring player after r rounds wins.

Combats Alpha, Beta, Gamma

At the end, each player's number of wins is tallied up. As the games' values show, the duel is in Apollo's favor.

A natural question is: what are Linus's odds of winning? That's what this simulation is for.

Simulation

Choice of Combats is a fair game (V=0), so singularProbs() uses linear programming to find an optimal mixed strategy.

Mixed strategies for the other games are straightforward to find (since V≠0), via the function getProbs().

The function combat() takes a game and plays it for a given number of rounds (the default is 5).

The function linaia.agon() takes the number of rounds per game (default 5) and a sequence length 𝓁 (i.e. number of rounds in Choice of Combats), and plays a complete duel with 2𝓁 combats.

The function xenakis() takes a number of iterations n (default 1000), rounds per game, and sequence length, and plays n separate duels, printing the number (and percentage) of wins by Linus, ties, and wins by Apollo.

The extra parameter cc.counts (False by default) includes wins and losses from Choice of Combats in the final score.

The extra parameter proportional (False by default) makes the number of rounds per game proportional to how often the game is played (i.e. the number of times it appears in the sequence generated from Choice of Combats).

Results

  • The higher the number of rounds and/or sequences, the less are Linus's odds of winning.
  • Including wins from Choice of Combats (cc.counts=T) raises Linus's chances considerably.
  • If rounds are proportional to game frequency, Linus's odds increase — by making rounds shorter.
  • Linus wins more from 5 rounds in 1 game (n,5,1) than 1 round in 5 games (n,1,5).
  • With 10 games of 5 rounds each, Linus wins about 3.2% of the time (0.5% ties, 96.3% Apollo).
  • At 1 round (excluding wins from Choice of Combats), Linus wins 25% of the time (13.5% ties, 61.5% Apollo).
  • At 1 round (including wins from Choice of Combats), Linus wins 39.6% of the time (8.77% ties, 51.6% Apollo).
  • Runtime is linear in iterations (1000 games take 1.22 seconds, 10,000 games take 12.5s).

Possible Extensions

  • Incorporate musical excerpts, to generate a performance of Linaia-Agon
  • Make graphs to show how results change with different parameters
  • Make it easier to use different mixed strategies besides the optimal

References

  • Bentley, J. (2014). “The Formal & Harmonic Structures of Linaia-Agon.” Working Paper.
  • DeLio, T. (1987). “Structure and Strategy: Iannis Xenakis’ Linaia-Agon.” Interface 16(3), pp. 143-64
  • Joncas, G. (2019). “Stochastic Game Theory and Iannis Xenakis.” Working paper.
  • Sluchin, B. (2005). “Linaia-Agon: Towards an Interpretation Based on the Theory,” in Georgaki, A. & Solomos, M. (Eds.). (2005). Proceedings of International Symposium Iannis Xenakis. Athens: University of Athens, pp. 299-311

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.