Posts In: Artificial Intelligence

Revisiting aoAIm

To say that my recent efforts have been directed in nearly every direction imaginable would be an understatement.  Though part of me feels guilty for not having made any substantial progress in algorithmic composition in about two weeks, I have indeed accomplished a great amount of work.  Having written a full procedural particle-deposition terrain engine from scratch and finished part of the multithreading code to allow continuous terrain generation in real-time, I definitely feel good about the productivity of the month, even if mGen's code stagnated.

Now, with the rekindling of my interest in c++ as a viable platform for development (thanks to the discovery of some libraries that should drastically reduce development time), I am revisiting the component of my previous research that could have benefited most from an object-oriented language: aoAIm, the general artificial intelligence engine.

Previously, work on aoAIm, which was actually quite successful in many respects (see previous entries) halted due to the growing complexity of managing an object-oriented engine in a language with no objective capabilities and little real intensive processing capabilities.  It is for this reason that I am now rewriting the aoAIm engine in c++, taking advantage of the object-oriented nature if the language.  I've had a few good ideas concerning heuristic function evaluation as well, which should allow me to go further with the engine this time.

Once again, it is tempting to question how this relates to algorithmic composition.  I have previously provided rationales for pursuing a general artificial intelligence model based on the possibility of such a model introducing a sort of purpose or deliberacy into the music.  Now, considering the newly-widened scope of the project, it is clear that a general intelligence model would have great applicability in other algorithmic art fields as well.

A true model of intelligence is something from which I cannot forever hide.  At some point, mGen will be bottlenecked by a lack of intelligence, rather than a lack of algorithm choices.

Stuck.

I'm not really sure what to do. My creative motivation is way down and I'm not even sure why. But what's worse, I'm stuck. Here's my dilemma.

1. aoAIm has gotten to the point that it's huge and gives me a headache just thinking about programming more A.I. And yet there's still a LOT to do if I want it to be able to make music. I've got so many heuristic things to do it's crazy. And programming "intelligent" heuristics is not fun.

2. Within the heuristics, I really don't know how to approach a certain problem concerning the behavior of multivariable functions. So I'm at a standstill with that part of the coding, which means I'm at a standstill with aoAIm.

3. I'd like to work on EvoSpeak or some other generative plugin, but I'm tired of the bad structures, so I want to work on a structure module.

4. I can't make a decent structure module without A.I. which is why I started aoAIm in the first place, and I've already established that I'm at a standstill with that.

5. I'd program a manual structure module but I can't figure out what to do with the darn parts system, which is STILL giving me bad dreams (so to speak).

6. All of this is happening while the new interface isn't even fully built. And I got sidetracked with A.I., which means the new interface code is no longer cached in my brain's RAM (again, so to speak). Which means another hour of just looking through the code figuring out what everything does again.

So the question is: where do I start? I'll try to brainstorm some ideas:

- Implement some kind of forcing mechanism to ensure that there's a certain number of parts so that the structure module can actually know exactly what the instrumentation will be ahead of time

- Change up the entire functionality of the structure/generative modules: instead of letting the user choose the generative modules, allow the structure module to choose. Could give the structure a "pool" of plugins to draw from. It would kind of be similar to what I have now, but the structure module wouldn't be "forced" to fit in all modules.

Also, I'm thinking about unifying the architecture a little bit. If the A.I. pulls through, I think it'll be beneficial to bring things together a bit so that the structure module (and the A.I.) will have more control. Still thinking about how to do this. That could mean a massive change in the architecture. Which would be nasty.

Close

Today I was supposed to have hit 23.000 lines of code. Of course I knew this was going to be difficult. The rate of coding required to hit this would have been almost double that of my last goal (almost 400 lines per day!). But I got awful close at over 21.800 lines. Not bad at all.

But what does that mean in terms of sound? Unfortunately, still less than I would like it to mean. But I'm working on internal things that should help me get the external cranking faster next time. If this A.I. pulls through, there's going to be a lot of stress floating off. There's a lot of code resting on aoAIm (over 2.000 lines). Having an intelligent composition engine would/will be amazing. I really hope it works.

aoAIm

Over the past week I've developed an artificial intelligence engine dubbed aoAIm: aspiration-oriented Artificial Intelligence model.

The goal of aoAIm is to create an A.I. engine capable of understanding any system into which it is placed and figuring out how to "solve" the system by achieving its aspirations.  I'm very impressed already with what the A.I. is capable of.  It's not doubt a lot more intelligent than any of the algorithmic systems I've made in the past.

So why artificial intelligence?  What does it have to do with music?

Here's the rational: if I can create a system that is legitimately intelligent, rather than one that simply comprises complex algorithms, then I will be able to create a system capable of creating great music without having to code hundreds of lines worth of rules and algorithms.  I could simply set the A.I. in the "system" of music, and tell it to solve the system for a good piece of music.

Given the complexity of the engine I've made so far (which is over two thousand lines already!), I believe that such a method of composition would have the ultimate balance between originality and coherence, which is one of my fundamental goals.  The system would be intelligent enough to create coherent pieces, but that intelligence wouldn't be coming directly from me!  It would be coming from the generalized framework of intelligence that I created, but the specific application of the intelligence to music would be all original to the A.I.  Thus, originality would be expected as well.  It's like teaching a child how to read sheet music and ending up with a piano prodigy.  I believe that would be quite rewarding.

You're Alive

I'm halfway there with the new AI system. But that doesn't mean it will work. I set up the basic outline and functions that drive the AI and it's all looking pretty good. The only problem is that it's insanely complex. Then again, so is human behavior. The front end, however, is very easy to use. Writing the library will be the hard part. Implementation will be a piece of cake.

My test today was pretty simple. I had an AI by the name of "Josh" setup and initialized in a very basic "Reality." I gave him some basic actions. He had the ability to do the following things: "get out of the chair," "walk from the Pilot Plant Building to the Main Building," "walk from the Pilot Plant Building to the covered walkway," "walk from the covered walkway to the Main Building," and "climb the stairs in the Main Building." All the actions were set up accordingly so that they could only be performed in their respective locations and caused the consequence of changing location (or seated status in the case of the first action).

I then gave "Josh" an aspiration: "get to the upstairs part of the Main Building." I initialized the Reality with Josh being seated in his chair in the Pilot Plant Building (the very location from where he was being programmed, oddly enough). To successfully achieve his aspiration, Josh would have to figure out that he needed to get out of his chair (because you can't walk around while seated), walk from the PPB to either the Main Building or the covered walkway (depending on the weather), walk from the covered walkway to the Main Building (if the weather is inclement), then climb the stairs to finally reach the upstairs. Of course Josh was not provided with any information indicating that this sequence would have the desired effect. It was the job of the AI to examine the Reality and actions available to it and determine the best course of action to achieve the aspirations.

Without flaw, Josh managed to perform the aforementioned sequence of actions. When I set the weather to sunny, Josh cut across the asphalt accordingly, and when I made it rain, he used the covered walkway to get to the Main Building. All of the implementation was accomplished in only about 50 lines of simple code.

Although it may seem trivial, this is definitely a success. The AI "intelligently" navigated its environment to achieve something it wanted. It's not fully AI yet because it's not smart enough to know how to achieve something if the achievement is too far away, and it doesn't know what to do if it gets stuck. But all of that will be filled in soon enough and I'll be able to test a more complex system (maybe even one that I can't predict).

I wonder if Josh will be able to make good music while he walks to the Main Building?

The Future of AI

I can see the future of AI.  I have the system written down.  I have numerous diagrams.  I have the networks, the nodes, the trees, the parsing structures.  But I'm not sure if I can make it work.

It would be ambitious, to say the least.  This new AI that I have dreamt would constitute intelligence, no doubt.  It would create music because it wants to, not because that's all it can do.  Programming it would be as simple as this:

AISystem.AddAspiration("compositionquality.miximize()")

And there you have it, an AI system that has one and only one aspiration: to make the most pleasing composition possible.  How would it achieve this aspiration?  In the very same way that humans do: by breaking it in to pieces, by envisioning the future, and by taking action to move towards the future.  Just as I am envisioning this AI system right now, my AI system will envision the ultimate composition.

It's all very lofty and probably sounds completely impossible to most.  But it can be done.  I'm not sure I have the programming ability to complete the system that I have drawn, but I'm going to try.  And it could be the future of AI, right here in my hands.

Stuck

For some reason I'm just not feeling much inspiration lately. I've been pushing into the conscious model and it's a lot of work and, while the results are cool, I'm ready to hear something really inspiring. At almost ten thousand lines of code, the program is huge and I feel like I'm not getting my money's worth, so to speak. I want to hear something awesome. Guess I'll just have to keep going.

Neural Networks - Emulating Human Creativity

Upon finding the article Algorithmic Composition and Reductionist Analysis: Can a Machine Compose? I immediately got excited. The author gives a great overview of algorithmic composition and details his own endeavors into the field.

In particular, the author touches on the concept of heuristic algorithms - including both genetic algorithms and neural networks - that slowly approach a desired solution by having a human evaluator determine the fitness of the system. I found the following quote astounding:

"A researcher trained a neural network to recognize makes of car from a photograph, and he decided to look inside the network at the individual neurons, rather than regarding it as a "black box" that somehow worked for some incomprehensible reason. He found that certain areas of the network were specializing into recognizing certain features of the car, and, by introducing a level of random "noise" into the network, got the network to design its own cars."

And finally, the author's take on algorithmic composition and creativity:

"I have always felt very uneasy about throwing any musical ideas away, as it would amount to destroying something that I think is unique. But, if computer composition took over to a degree, would the 'preservation people' be content with the idea that the music exists, somewhere, within the set of possibilities? May I delete Clara Empricost's symphony with impunity, once it has generated it? Should I preserve the algorithm and the random number seeds somewhere? An interesting set of problems."