• Lucid Dreaming - Dream Views
    + Reply to Thread
    Results 1 to 21 of 21

    Thread: AI Program

    1. #1
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301

      AI Program

      I got bored yesterday and wrote a dynamic AI scripting language for a Nought & Crosses (Tic-Tac-Toe) game. So far, there's a group of programs that have evolved to beat the usual 2-5-8 win

      Oh, and this only works on Windows platforms.

      Download: http://www.filefront.com/14485647/T-T-T%20AI%20v2.rar
      Last edited by A Roxxor; 09-07-2009 at 02:28 PM.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    2. #2
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Sorry, found a huge bug. Fixed it, though

      http://www.filefront.com/14485647/T-T-T%20AI%20v2.rar
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    3. #3
      Xei
      UnitedKingdom Xei is offline
      Fireworks and Hurricanes Achievements:
      Referrer Bronze1 year registeredVeteran Second ClassMade lots of Friends on DV1000 Hall Points
      Xei's Avatar
      Join Date
      Aug 2005
      Location
      Cambridge
      Posts
      8,454
      Likes
      1681
      How does it work?

      I'm guessing you've done it in a special way because it's pretty trivial to create a program which always wins or ties, you just have to list all of the different situations and the correct move.
      http://i299.photobucket.com/albums/mm307/Vudusu/Xeisig.jpg
      soft she stirs on starlit sand,
      and clasps wet shore within her hand.
      she turns to face the silent seas,
      and through her heart, a vital breeze.
      she wonders at this strange new land.

    4. #4
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Lol yeah. What it actually does is contains a population of programs that use a pretty simple (But dynamic!) scripting language that is basically all about placing pieces on the board. When you play a game, the computer randomly selects a script to run, and depending on how it performs determines how many times it gets to reproduce. Programs that get to a point where they cannot place a piece in an empty square are killed, and when an program reproduces (Always asexual with only one chromosome) random mutation and information dithering may change the script, resulting in new behavior. To get a list of all of the programs and their stats, type 13 into the console and check the data folder for Programs.txt.

      Also, new version: http://www.filefront.com/14486417/T-T-T%20v3.rar

      Fixed a few crashes.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    5. #5
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Forgot to actually upload the fixed version: http://www.filefront.com/14486645/T-T-T%20v4.rar
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    6. #6
      I'm captain jack sparrow! Noogah's Avatar
      Join Date
      Mar 2009
      Posts
      1,505
      Likes
      130
      Man of hidden talents. Lol. I didn't know you were into programming, roxxor. Works nicely. You should make a gui.
      John 3:16

      For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

      "Vox populi, vox humbug"
      -William Tecumseh Sherman

    7. #7
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Yuss. GUIs are too needy and make everything all cluttered early on. I may make one once I actually finish the program

      Here's the latest version w/ a trainer. The Trainer program runs the AI scripts against a random number generator, so it isn't particularly effective, I was just testing it for memory leaks. The trainer runs 20,000 iterations (Several minutes on an Intell E8400 @ 3.00GHz) before stopping. Just hit enter to exit it. I'll post up the completed version when I'm done.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    8. #8
      I'm captain jack sparrow! Noogah's Avatar
      Join Date
      Mar 2009
      Posts
      1,505
      Likes
      130
      Nice. I love AI, and who doesn't love tic tac toe? I'll be watching for the full version.
      John 3:16

      For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

      "Vox populi, vox humbug"
      -William Tecumseh Sherman

    9. #9
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Er, here's the D/L link...

      http://www.filefront.com/14506967/T-T-T-v6.rar/

      I have a better version in the works, but I keep running into some nasty runtime errors in the new trainer for some reason. I'll upload it when I fix that.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    10. #10
      I'm captain jack sparrow! Noogah's Avatar
      Join Date
      Mar 2009
      Posts
      1,505
      Likes
      130
      So, does the trainer basically work against itself? Also, whats with all the organism babble? Is this also a computer natural selection thing? I'm getting confused.

      John 3:16

      For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

      "Vox populi, vox humbug"
      -William Tecumseh Sherman

    11. #11
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      This is a precursor for an Artificial Life simulator I am working on. Organism = Program = Reproducing entity that carries inheritable, mutable information that directly describes that entity's structure and behavior.

      The program works using a dynamic scripting language I wrote with the principles of random mutation and natural/artificial selection. Right now, the trainer you have runs for 20,000 steps and pits a random program against a random number generator that selects the spot it places and the program is either rewarded or punished based on how well it did. What I am working on is a system that will pit a random program versus a random program and let natural selection ensue, as a random pattern is more likely to fail and pass along stupid, error-full and self-destructive programs.

      Basically, a program is just a set of instructions that revolve around playing tic-tac-toe. The program has a stack which is can place items onto, delete from or query, and has the ability to query squares on the board and place pieces from its stack. It can also perform a few arithmetic functions on its stack items.

      Whenever a program is playing as the opponent it is being scored based on its performance. For instance, if a program wins, it is allowed to breed many times depending on how many loses and ties it has. Same thing for a tie, only less times. A program that loses does not get to breed, but is not culled either. After every game 15 - 25% of the population is killed off at random, and if the population goes below 35 it is revived by random reproduction. The population is also capped at 2000, with programs having a maximum of 300 instructions and 300 stack items. Any more will cause the program to die. After several thousand generations [of challenging games, not a random guessing opponent], programs will likely emerge that can tie and/or beat human opponents.

      I intend to take this basic system and turn it into a fully-fledged artificial life simulator that I am still designing to model real organisms as close as possible and still be able to calculate thousands of instructions per second.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    12. #12
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Here's the final version with the completed trainer: http://www.filefront.com/14525855/T-...%20Version.rar

      The trainer now pits program vs program and you can already see that winning patterns are starting to show up within the population.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    13. #13
      I'm captain jack sparrow! Noogah's Avatar
      Join Date
      Mar 2009
      Posts
      1,505
      Likes
      130
      |Noogah nodds intelectually, and pretends to understand everything|


      ANYHOOOOOOW.....

      That's a cool game. Congrats on that. Especially the whole...evolving thing. It's neat. You a programmer or a hobbiest?
      John 3:16

      For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

      "Vox populi, vox humbug"
      -William Tecumseh Sherman

    14. #14
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      I am a programmer, but I'm not getting payed to do it yet.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    15. #15
      I'm captain jack sparrow! Noogah's Avatar
      Join Date
      Mar 2009
      Posts
      1,505
      Likes
      130
      You can do freelancing.

      There are a LOAD of websites that hire freelancers. If you have the time, that could be a good way to rake in some extra cash.

      Sources? Google.
      John 3:16

      For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

      "Vox populi, vox humbug"
      -William Tecumseh Sherman

    16. #16
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Yes, I know. Most require you to be at least 18 and have several years of professional experience and/or a degree. I'm not currently looking for a job right now.

      Anyway, I tweaked the mutation rates, etc and reworked the ecosystem code, as there were a couple flaws that made it work slowly. Also, I also implemented usage of 64-bit integers to ensure that program IDs don't get too large that they mess up the program.

      D/L : http://www.filefront.com/14546017/T-T-T%20v32.rar
      Last edited by A Roxxor; 09-16-2009 at 04:57 PM.
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    17. #17
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Noöne is interested in this at all?
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    18. #18
      Dismember Achievements:
      1 year registered1000 Hall Points
      SnakeCharmer's Avatar
      Join Date
      Mar 2009
      Gender
      Location
      The river
      Posts
      243
      Likes
      37
      I'm interested, but I feel like a mental midget when it comes to discussing stuff like this.
      Can you make something similar for a general game theoretic situation? Something like prisoner's dilemma, but that allows users to set up a payoff matrix. Then you have a population of strategies playing against each other pairwise.
      The fitness could be the average payoff a strategy gets when playing against other strategies (and itself).

      It might be a good feature to include in your artificial life simulator, provided you want your digital organisms to be social creatures.

    19. #19
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      Yes, that will be possible. I don't think I would include that in the ALife program though. I want to see emergent properties emerge with it

      I think I might do that with this program once I fix up the scripting language
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    20. #20
      Smarter than a chimpanzee Achievements:
      1 year registeredMade Friends on DV
      PhilosopherStoned's Avatar
      Join Date
      May 2009
      Gender
      Location
      Not too high, not too low
      Posts
      2,153
      Likes
      426
      Quote Originally Posted by A Roxxor View Post
      Noöne is interested in this at all?
      I've been watching and I plan on checking it out when I get some free time. I'm very interested in this stuff at times but I'm on a physics roll recently and I don't want to get side tracked The down side of azbergers Gotta watch myself or I get sucked in very easily. If you had written it in lisp, I'd be all over it already
      Post-Rapture Pet-Sitting Services
      Come join the Buddhism Stack.

      "The opposite of a true statement is false statement, but the opposite of one profound truth may very well be another profound truth. "
      -Niels Bohr

    21. #21
      Death to the Infidel! Achievements:
      3 years registered1 year registeredReferrer BronzeMade lots of Friends on DVPopulated Wall
      <span class='glow_855E42'>Sornaensis</span>'s Avatar
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,722
      Likes
      301
      You have asberger's?

      And I don't know lisp
      http://www.jakecloud.com/kyle/upload/files/mewtwosig.png
      Formerly A Roxxor

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts