Advertisement

Tower of Hanoi, and GA

Started by May 21, 2003 11:24 AM
5 comments, last by capn_midnight 21 years, 3 months ago
A little thought experiment for you: A Genetic Algorithm may be used to solve the Tower of Hanoi game. What are you''re thoughts on the subject? Once a few people have posted, I''ll post my own experience with this odd, if not stupid, pairing, complete with a moral to my story.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

So can a 3 step recursive algorithm.

Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Advertisement
Yeah, what's the point of using GAs for this?


    #include <cstdio>#define S(s) ;x^=x s 16;#define _(s) S(s)if(n)N(n)S(s)char x=19;void N(int n){n--_(/)std::printf("%X ",x+0231)_(*)}int main(){N(8);}    



[edited by - Alvaro on May 21, 2003 4:14:44 PM]
What''s the point of studying AI at all?

Alvaro, what is the point of creating an incredibly short and obfuscated solution to the problem? BECAUSE YOU LEARN SOMETHING IN THE PROCESS!

InnocuousFox, I know that the Tower of Hanoi has a 3 step recursive algorithm. The point is, it''s an exercise for GA''s. For some reason, I fealt a desire to try solving it in a completely new direction.

In the process, I learned a lot about GA''s in general. I was going to share my experience with everyone, perhaps a beginner would read it and become inspired. I think Genetic Algorithms are a very intriguing subject that deserve more attention.

Now, I will keep my knowledge to myself.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

What knowledge? The "gene" is a string of sequential moves that give the commands:

A to B
A to C
B to C
B to A
C to A
C to C

The length of the string should be more than enough to solve the problem.

The fitness score is developed by how "solved" the puzzle is when you get to the end of the sequence.

There are likely a few more quirks to it, but that is one approach. *shrug* The problem I have is that it is a complete mismatch of a problem with an AI style.

Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Way to set an example to everyone by sharing your findings in spite of the comments of others. Oh, wait, I mean way to get angry because of the comments of some random people on an internet message board.
Advertisement
Capn_midnight:

I think it''s a great idea. It''s a simple puzzle, and it would be fun to watch the solutions the pop up. I would love to see some movies of it trying to solve the puzzel at different stages of evolution.

Good luck,
Will



------------------http://www.nentari.com

This topic is closed to new replies.

Advertisement