Welcome to Slanter's AutoHotkey page!


Current Project: Bug Script
(This script is written in AU3, compiled versions are available!)

My current project is something that I find very interesting. A program that can "learn" and adapt to an environment. It is, of course, very basic as far as these things go, but I'm still working on it.

Basically, the script creates a starting population of "bugs" with random "genes" such as speed and gender (the others aren't implemented yet) and they attempt to gather food and reproduce. The offspring have a chance to mutate a little, and they randomly receive "genes" from their parents. After 50 days they reach maturity, and the bugs die of old age after 500 days. They will also starve to death if they don't find enough food (average of about 1 food/33 days I think).

Anyways, this script seems to demonstrate at least a small amount of learning capability in that the bugs are getting more efficient at surviving. On my test run (which I have going right now) the bugs started out with a population that averaged 35-36, and now after almost 2000 days the population is sitting at 40-41. I know this isn't really anything that amazing, but it's a work in progress and I thought someone might find it interesting.

You can change the starting population/amount of food with the lines "BuildStartingPopulation(10)" and "BuildStartingPopulation(25)". You can also change any of these globals found near the beginning of the script (the other ones are for the script to function):
$BoundX - Highest X coordinate for food creation
$BoundY - Highest Y coordinate for food creation
$FoodRegen - Number of days for new food to be made
$FoodRegenAmt - Amount of new food made each time

Script Versions
~ Version 0.01 (Alpha) - 9/06/08
~ Version 0.02 (Alpha) - 9/07/08 (exe)
~ Version 0.03 (Alpha) - 9/07/08
~ Version 0.10 (Alpha) - 9/07/08 (exe)

Changelog
~ Version 0.10 (Alpha)
- Fixed more graphic redrawing problems
- Added logging of bug creation/death
- Fixed a time problem
- Reduced energy cost for mating by 50%
      was 50, need 60 to mate
      now 25, need 35 to mate
- Bugs will now always search for food if no mate is found
- Made starting age random -1 to 1 to make bugs mature more randomly
- Bugs now lose energy from speed when moving
- Reduced the amount of energy lost from speed per age
- Fixed mutation rates to a set 1/5 chance (mistakenly ~1/5E15)
- Lessened how extreme mutations are by 25%
- Bugs will now finish the rest of their move cycle after eating
~ Version 0.03 (Alpha)
- Fixed movement updates while in "mating mode"
- Bugs will now only mate if they will survive it
- Time now passes twice as quickly
~ Version 0.02 (Alpha)
- Created a GUI that displays the bugs
~ Version 0.01 (Alpha)
- Initial Release


Scripts:
- Function / Variable Linker
- Notepad Indent
- WoW Multi-box