Saturday, March 14, 2009

Objective-C

I switched over to Apple in 2003/2004 ish, and I've never really done any programming on it. Because of the iPhone, my intrest in apple development has peaked. So these last few days I've been looking into it and building some sample apps in XCode.

I'm intrested in building a Visual Novel of sorts. As a kid I loved choose your own adventure books and I've played a few VN that I liked. I've also played a bunch that I hated.

But being the writer & programmer that I am. I thought it could be fun to build my own.

There are a number of ways I could build this, the easyest being HTML and JavaScript (another AIR app). But I kinds want this to be on the iPhone (partly becuase if it successeds I could sell it).

So now I'm looking at how it can be done in objective-c and cocoa. To be honest I haven't programmed in C (or C++) in over 7 years. Looking over samples rings some bells, but Cocoa is a new beast all together. Anyway, I think I'm going to try this objective-c programming.

I know this isn't very zen of me. I could have something up and running in a matter of hours if I stuck with JavaScript or C#. I don't even have a story or graphics yet. I just have a vage idea of a zombie survival story.

I really should write the story first, then worry about programming.

Still, I find myself here even when I know I shouldn't.

Monday, January 12, 2009

Ideas

For years I've been toying with different ideas for thinking or evolving software. The concept where you give the program a goal, some starting information, and some rules; and the program figures out the best way to reach the goal.

My favorate so far is the evolving method. The program created thousands to millions of little randomized programs and makes them surive or die. Maybe I'm just fasinated by the idea that something intelligent can derive from randomness. One of my favorate demonstations is where clocks evolve out if random parts (YouTube clock evolution).

If I could harness this idea, then there would be no limit to the problems it could solve. With enough time and prossessong power, it could solve anything.

So I was thinking today of how to build said program. My first instinct was to build it in C# because that's where I'm strongest. Then I thought I should build it in python because the language is a lot more flexible and would lend it's self easer to this kind of project.

Both have good points and both could be argued for my zen method. But which one is the right one? Speninding too much time on that question is very anti-zen. It's better to just pick one, even the wrong one, than to spend to much time debating the choices.

Back to how the system would work. I was thinking something like a table structure. The first column would be the input. The seciond would be the rule or function. The third would be the result.

The input could come from any of the sesory inputs, any random number(s)/letter(s), or the result from any row above it. This table would then be the programs DNA so to speak. It would be evaukated in order and the last row would contain the final result.

The rules would have to defined to the specific problem being solved. Over time universal rules that apply to almost any (if not all) problems could be defined. I think the more general the rules are, the longer it will take to find the best solution.

With enough random creatures, a very small percent will have some sort of solution. Then the winners go on to round two and new random children are created. Some of the new children will get random sections of the winners DNA. This process is repeated umtill the best solution is found.

A Question.
How do we know who was close to the correct solution? It would be easy if some of the found the solution, but I fear that that would take an impossible number if starting creatures.