Background
Earlier than there was Generative AI there was Generative Artwork. In case you are not acquainted, Generative Artwork is principally utilizing code to create algorithm pushed visualizations, that sometimes incorporate some ingredient of randomness. To be taught extra I strongly encourage you to take a look at #genart on X.com or go to OpenProcessing.org.
I’ve at all times discovered Generative Artwork to an enchanting medium, providing distinctive methods to specific creativity by way of code. As somebody who has lengthy been a fan of P5.js, and its predecessor the Processing framework, I’ve appreciated the sweetness and potential of Generative Artwork. Lately, I’ve been utilizing Anthropic’s Claude to assist troubleshoot and generate artwork works. With it I cracked an algorithm I gave up on years in the past, creating circulation fields with first rate wanting vortexes.
Seeing the ability and speedy iteration of AI utilized to code artwork led me to an intriguing thought: what if I may create AI-driven artwork competitions, enabling AIs to riff and compete on a particular artwork theme? This concept of pitting AI brokers towards one another in a artistic competitors shortly took form, with a scrappy Colab Pocket book that orchestrated tournaments the place AI artists generate code artwork, and AI judges decide the winners. On this article, I’ll stroll you thru the method, challenges, and insights from this experiment.
Setting Up the AI Artwork Competitors
For my mission, I arrange a Google Colab Pocket book (Shared Agentic AI Art.ipynb), the place the API calls, artists and judges would all be orchestrated from. I used the OpenAI GPT-4o mannequin by way of API and outlined an AI artist “Assistant” template within the OpenAI Assistant Playground. P5.js was the chosen coding framework, permitting the AI artists to generate sketches in JavaScript after which embed them in an HTML web page.
The pocket book initiates the Artists for every spherical offering them the immediate. The output of the artists is judged with suggestions given and a winner chosen, eliminating the shedding artist. This course of is repeated for 3 rounds leading to a last profitable artist.
The Competitors: A Spherical-by-Spherical Breakdown
The competitors construction is easy with Spherical 1 that includes eight AI artists, every competing head-to-head in pairs. The winners transfer on to Spherical 2, the place 4 artists compete, and the ultimate two artists face off in Spherical 3 to find out the champion. Whereas I thought of extra advanced event codecs, I made a decision to maintain issues easy for this preliminary exploration.
In Spherical 1, the eight artist are created and produce their preliminary artwork work. Then the AI decide, utilizing the OpenAI ChatGPT-4o with imaginative and prescient API, evaluates every pair of submissions primarily based on the unique immediate. This course of permits the decide to offer suggestions and choose a winner for every matchup, progressing the competitors to the subsequent spherical.
In Spherical 2, the remaining AI artists obtain suggestions and are tasked with iterating on their earlier work. The outcomes have been blended — some artists confirmed clear enhancements, whereas others struggled. As a rule the iterative course of led to extra refined and sophisticated paintings, because the AI artists responded to the decide’s critiques.
The ultimate spherical was notably attention-grabbing, as the 2 finalists needed to construct on their earlier work and compete for the highest spot. The AI decide’s suggestions performed an important function in shaping their last submissions, with some artists excelling and others faltering beneath the strain.
Within the subsequent sections I’ll go into extra element in regards to the prompting, artist setup and the judging.
The Immediate
Firstly of every competitors I present an in depth competitors immediate that will likely be utilized by the artist in producing the P5.js code and the decide in analysis the paintings. For instance:
Create a classy generative artwork program utilizing p5.js embedded in HTML that explores the intricate great thing about recursive patterns. This system ought to produce a static picture that visually captures the countless repetition and self-similarity inherent in recursion.
Visible Parts: Develop advanced constructions that repeat at totally different scales, similar to fractals, spirals, or nested shapes. Use constant patterns with variations in measurement, shade, and orientation so as to add depth and curiosity.
• Recursion & Repetition: Experiment with a number of ranges of recursion, the place every stage introduces new particulars or refined variations, making a visually partaking and endlessly intricate design.
• Creative Innovation: Mix mathematical precision with inventive creativity, pushing the boundaries of conventional recursive artwork. Make sure the piece is each visually fascinating and conceptually intriguing.
The ultimate output needs to be a static, high-quality picture that showcases the countless complexity and great thing about recursive patterns, designed to face out in any competitors.
Configuring the AI Artists
Organising the AI Artists was arguably an important a part of this mission and whereas there have been a couple of challenges, it went comparatively easily.
An vital design resolution was to make use of the OpenAI Assistant API. Creating the AI artists concerned configuring an assistant template within the OpenAI Playground after which sustaining their distinct threads within the pocket book to make sure continuity per artist. Using threading allowed every artist to recollect and iterate on its earlier work, which was essential for creating a way of development and evolution of their artwork.
A key requirement was that the AI Artist generate P5.js code that will work within the headless browser that my Python script ran. In early variations I required that the agent use structured information output with perform calling, however this created lots of latency for every paintings. I ended up eradicating the perform calling, and was fortunate in that the artist response remains to be about to be persistently rendered by the headless python browser, even when there was some commentary within the response.
One other key enhancement to the assistant was to offering it with 5 current subtle P5.js sketches as supply materials to wonderful tune the AI artists, encouraging them to innovate and create extra advanced outputs.
These implementation selections led to a reasonably dependable AI Artist that produces a usable sketch about 95% of the time, relying on the prompts. (Extra could possibly be completed right here to enhance the consistency and/or apply retries for un-parsable output)
Judging the Artwork
Every face to face match-up makes a ChatGPT 4o name evaluating the 2 submissions facet by facet and supplied detailed suggestions on each bit. In contrast to the artist, every decide name was recent with out an ongoing thread of previous evaluations. The decide supplies suggestions, scores and a number of who received the match. The decide’s suggestions is utilized by the profitable artist to additional refine their artwork working of their subsequent iterations, generally resulting in important enhancements and different occasions leading to much less profitable outcomes.
Curiously, the AI decide’s selections didn’t at all times align with my very own opinions on the paintings. The place my favorites have been pushed by aesthetics, the decide’s picks have been typically pushed by a strict interpretation of the immediate’s necessities and a really literal sense of the artworks adherence. Different occasions the decide did appear to name out extra emotional qualities (e.g. “provides a contemplative really feel to the piece”), as Massive Language Fashions (LLMs) typically do. It will be attention-grabbing to delve extra into what bias or emergent capabilities are influencing the decide’s resolution.
Outcomes and Reflections
I ran quite a few competitions, attempting totally different prompts and making changes. My immediate matters included flowers, rainbows, waveforms, flow-fields, recursion, kaleidoscopes, and extra. The ensuing paintings impressed me with the sweetness, variety and creativity of the paintings. And whereas I’m delighted with the outcomes, the aim was by no means simply to create stunning artwork work, however to seize learnings and insights from the method:
- A supply of inspiration — The amount of concepts generated and the speedy iteration course of makes this a wealthy useful resource for inspiration. This made the competitors framework not only a software for judging artwork, but in addition a useful resource for inspiration. I plan to make use of this software sooner or later to discover totally different approaches and acquire new insights for my very own P5.js artwork and different artistic endeavors.
- Generative Artwork as a singular measure of creativity — “Code artwork” is an intriguing functionality to discover. The method of making an artwork program could be very totally different from what we see in different AI artwork instruments like MidJourney, Dall-e, Secure Diffusion, and so on. Fairly than utilizing diffusion to reverse engineer illustrations primarily based on picture understanding, Generative Artwork is a extra like writing a fictional story. The phrases of a narrative elicit feelings within the reader, similar to how the code of Generative Artwork does. As a result of AI can grasp code, I consider my explorations are solely the beginning of what could possibly be completed.
- What are the bounds? — The artworks generated by these Agentic AI Artists are stunning and artistic, however most are remixes of code artwork I’ve seen earlier than and perhaps a couple of completely happy accidents. The profitable artworks demonstrated a stability between complexity and novelty, although reaching each concurrently remained elusive. That is possible a limitation of what I invested and with extra wonderful tuning, higher prompts, extra interactions, and so on. I might not underestimate the potential creations.
- Evolving the Agentic AI Artist — Defining the identical AI artists template with persistent threads led to extra distinctive and numerous outputs. This sample of utilizing agentic AI for brainstorming and thought technology has broad potential, and I’m excited to see how it may be utilized to different domains. In future iterations it will be attention-grabbing to introduce actually totally different AIs with distinct configurations, prompting, tuning, goal capabilities, and so on. So not only a suggestions loop on the paintings, however the a suggestions loop on the AI artist as nicely. A “battle” between uniquely coded AI artists could possibly be an thrilling new frontier in AI-driven creativity.
Conclusion
Engaged on this agentic AI artwork competitors has been a rewarding expertise, mixing my ardour for code artwork with the exploration of AI’s artistic potential. This intersection is exclusive, because the output just isn’t merely textual content or code, however visible artwork generated immediately by the LLM. Whereas the outcomes are spectacular, in addition they spotlight the challenges and complexities of AI creativity, in addition to the capabilities of AI brokers.
I hope this overview evokes others focused on exploring the artistic potential of AI. By sharing my insights and the Colab pocket book, I goal to encourage additional experimentation and innovation on this thrilling discipline. This mission is simply a place to begin, nevertheless it demonstrates the probabilities of agentic AI and AI as a talented code artist.