Bots and Simulations > Untagged bots
Slam Funk 1.0
Ta-183:
Thanks for the tip, ikke. If there's something I've learned about DNA yet, it's how to, eh, 'splice' code.
I just finished another internal build, this one I have high hopes for. It has a few new tricks, though still can't switch between body and energy shots.
EDIT; It works, not as well as I'd hoped, but it's definitely an improvement. It can get past Chase no problem now and it can stand up to Roto fairly well for an early model. It can't beat Roto yet, but with some tweaks and optimization it should be able to get past it. But they do get too small, too quick. They need to keep their size up without compromising reproduction. I'm thinking about testing it with body storage disabled.
Moonfisher:
You can't change the focus eye mid cycle...
You need to understand how the whole thing works : (Going to assume you know none of all this, so forgive me if it sounds condecending, I don't whow much you know)
When you write 50 .repro store then you're just pushing the value 50 into the memory location of .repro
Every command or sysvar has a memmory location, and can be manipulated.
Once the code is executed the value standing in the .repro location at the end will be the one executed.
So you can't write 50 .repro store a hundred times but you will still only reproduce once (You also wouldn't be able to reproduce more than once every cycle anyway).
This also means if you get hit by a virus and a gene causing you to reproduce is inserted in the bots code you can still prevent this at the end of your code.
(For instance by having an odd repro value and disalowing any others)
So basicaly changing eyefocus can only happen once every cycle, if you want a good example for an eye system look at EyeBot (An F3 bot in the starting gate).
You should also understand how the boolean and integer stack works:
Writing 50 .repro store actualy means you're pushing 50 into the integer stack, then the location coresponding to .repro (You can see all these values on the sysvars page on the wiki).
The store command pushes the first value into the memmory location pointed out by the second value.
The add command would add them together and push the result into the stack. (When values are used they are poped from the stack)
The boolean stack works in the same way, and code will be executed if the top value on the stack is true.
This is how inline conditions work... (Meaning between start and stop)
The conditions between cond and start are seperate from the regular boolean stack and work as a conditions for the entire gene. These are also and'ed together into a single boolean whereas inline conditions are handled manualy and the boolean on the top of the stack counts.
(Unlike the integer stack these are not popped when used)
EDIT: And yes the F3 league is a good place to start, look at the code in the bots you're fighting, theres some "tutorial" bots in there with a minimum of code and behavior, and they increase by 1 or 2 genes for each new bot, making it easy to tell the difference and see what new gene is making the difference. And I think the new gene in each bot may be commented... but either way the name of the bot should tell you what it's doing different. (Aim actualy aims at oponents, chase adjusts .up and .dx to match oponents, and so forth)
strbody increases body size spending energy, and fdbody eats the body to gain energy so if your bots are getting smaller you probably need to use strbody more, or base reproduction conditions on both size and energy...
Once you run into some of the top F3 bots then I recommend moving on to F2 if you get tired of trying to beat them... lots of tweeking and such, unless you have a better strategy (I know I have one ideas for a very different behavior that could probably beat the current top F3, and theres probably many other ways than what I have in mind since F3 hasn't been around too long.)
Anyway F2 allows poison and shell... and venom and mem shots
Not sure if the rules where suposed to change at some point or not... currently F2 is the same, but we did have a discussion at some point that never realy got conclusive results I think...
And F1 has no rules at all... anything goes... stuff like viruses and tie feeding makes it all very interesting
Just saying if your bots is having trouble advancing in a league I think it can be more fun to jumpt between leagues a litle to try new things and gather inspiration.
Also running other people bots against eachother to see what they're doing can be a good source of ideas.
And even evo sims can spawn some realy good ideas for league bots... evolution has a way of finding clever solutions we would never have thought about
Also a good tip... shell and poison are cheap (Not allowed in F3 though), but 10000 energy in order to replenish shell is a LOT of energy... shell/poison costs next to nothing (0.01 nrg I think) and can prevent a lot of damage.
With around 500 shell you also won't be slowed down too much and it only costs 5 nrg to make 500 shell, so something like :
*.nrg 50 >
500 *.shell sub .mkshell store
Would be quite safe and allow your bot to keep 500 shell at all times (It would also prevent bots like pacifist or certain viruses from forcing shell on it to prevent movement).
Ta-183:
Thanks, moonfisher. I learned all of this stuff on the fly writing this bot as I was diving through the tutorials. I'm getting pretty good results from constantly updating this bot, I'm working on my 7th or 8th internal build. I'm also going to start work on an F1 derivative using tie feeding and info shots, possibly a discrete virus to stop the target from shooting. It wont be terribly advanced but it should do some serious damage. I haven't done any work on it yet but I'm going to base it off an internal build of Slam Funk (ver 1.01b).
Ta-183:
DISREGARD THE FOLLOWING CODE.
I'm at school and I need a place to save my 'notes'. The following genes are (more than likely) non-functional and incomplete. Though if you spot any spelling errors or syntax errors, PLEASE let me know.
--- Code: ---'Communication
def txpos 0
def typos 0
'Identification Friend Foe or Food
def IFFF 0
def notarget 0
def friend 1
def food 2
def foe 3
'For later use
def veggie 20
'What am I doing right now?
def situation 0
def nothing 0
def eating 1
def fighting 2
'Condition
def health 0
def fine 1
def injured 2
def dying 3
def intox 4
'Can't see shit, captian
cond
*.eye1 0 =
*.eye2 0 = and
*.eye3 0 = and
*.eye4 0 = and
*.eye5 0 = and
*.eye6 0 = and
*.eye7 0 = and
*.eye8 0 = and
*.eye9 0 = and
start
*.nothing .situation store
0 .IFFF store
stop
'Friendly Bot
cond
*.refshoot 0 >
*.refeye *.myeye =
start
*.nothing .situation store
*.friend .IFFF store
stop
'Food
cond
*.refkills 0 =
*.refshoot 0 = and
*.refeye *.myeye != and
start
*.eating .situation store
*.food .IFFF store
*.refxpos .txpos store
*.refypos .typos store
stop
'Foe
cond
*.refshoot 0 >
*.refkills 0 > or
*.refeye *.myeye != and
*.IFFF *.friend != and
start
*.fighting .situation store
*.foe .IFFF store
*.refxpos .txpos store
*.refypos .typos store
stop
cond
*.IFFF *.food =
*.IFFF *.foe = or
start
*.IFFF .out1 store
*.txpos .out2 store
*.typos .out3 store
stop
cond
*.IFFF *.notarget =
*.IFFF *.friend = or
start
*.IFFF .out1 store
0 .out2 store
0 .out3 store
stop
'Listen for signs of food, turn towards it if not doing anything more important
cond
*.in1 *.food =
*.situation *.nothing= and
start
*.in2 *.in3 angle .setaim store
10 .up store
*.eating .situation store
stop
'Listen for signs of trouble. Go fight if there is any.
cond
*.situation *.nothing =
*.situation *.eating = or
*.in1 *.foe = and
start
*.in2 *.in3 angle .setaim store
10 .up store
*.fighting .situation store
stop
--- End code ---
ikke:
looks promising..
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version