Skip to content

guilhermesilveira/generativemagic

Repository files navigation

GenerativeMagic is the use of Generative Design for the magical art.

What? It is magic created, enhanced or suggested by a computer, a field of computer-automated design and computer art coined by this project.

So it is like computer generated graphics, but for magic? No. Generative art (and design) is much more that just generating graphics, it helps us design new magical effects, improve existing ones and much more.

How can a computer create magic?

Elmsley and other magicians deduced formulas to create amazing effects. Pit Hartling, Seth Raphael and others used computers to co-design effects. Now we can discover, combine and generate infinite possibilities with generative magic.

Computers can aid in the creation process of magic in several ways. This project aims but is not limited to the following topics:

  • a new effect can be created (constraint programming, machine learning etc)
  • a new effect can be suggested to improve an existing routine
  • generate new magical movements, routines and acts
  • suggest impromptu effects
  • generate unique routines every time a magician presents
  • generate scripts using natural language processing for existing and new routines
  • catalog magical movements
  • create a computer understandable lexicon of magical effects, routines and acts
  • generate control out of randomness by using computer vision
  • generate control out of uncontrolled effects using constraint programming and simultations
  • generate control out of randomness
  • slowly get to know and control an entire set of items (i.e. cards) as they are revealed, "re-sequencing" live
  • create improvisation for beginners, using techniques that they already master
  • generating NLP based excuses for non-natural movements in magic

How to use it?

If you want to perform an effect generated with GenerativeMagic, talk to its creator. If you want to generate an effect, check the examples(https://github.com/guilhermesilveira/generativemagic/tree/main/examples). For other enquiries, contact us.

It looks like you want control of the cards?

Can I use with shuffled decks?

Yes. Even a real random shuffled deck can be used with GenerativeMagic. You can use tools such as computer vision to recognize the new order. Or controlled real shuffles and real cuts to know the random output.

Is this restricted to card magic?

So far the implementation is done based on card effects. Simple and gaffed cards can be used. Stacked, memorized, shuffled.

Is this also a library for creating magic apps?

No and yes. GenerativeMagic will help you create something new, and then make use of that.

What is runtime/showtime?

GenerativeMagic will run before the show to set up the presentation and also during the show. Before the show is the discovery time and the second one is showtime. Generation and simulations can happen in both situations.

Can you explain me how it works?

Magic effects are often taught and sold as fixed effects, limited by the magicians culturas boundaries, such as language, nationality, country etc. But most of them are parameterized. Those parameters come from a parameter space (the feasible region) which can be either explored to find new magic, or to control the effect's output.

Magical movements are often random but can switched to deterministic, controlled or understood behaviour under a few circumstances, for example:

  • online live magic sessions allows the magician to capture the current setup of a volunteers deck
  • parametrized inputs can guarantee deterministic output even in random selections
  • picking up packets of cards can be controlled instead of randomized

Parametric design rules can be used to generate simple rules and complex effects with the help of constraint programming.

Where is the human-readable routine description for each magic effect?

Most of the routine description for magic effects are in their respective books, dvds etc.

Why make its code public?

I grew in a community of open source and shared knowledge. I am the founder of a school, so I was heavily involved in education. Both approaches value sharing its knowledge with others interested on it. I understand knowledge will growth faster if shared, and more people who would not have access to it now can have it too. I am not sharing it with spectators, but with those who want to learn it.

What about display/perfomance rights?

Just like any art form, if you use a tool, and your own input to create an art piece, it is your art. GenerativeMagic is a tool. If you created a magic routine using GenerativeMagic with your own input before others, it is your art.