Animal/Bot coding (AI) (Part Two)

Online C++ programming contests.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard, raimo

Postby RecursiveS » Sun Sep 05, 2004 8:23 am

OK - the initial discussion etc is now over and the first deadline for submission passed.

What say I split the topic here - it must be getting slow to load for some users ??????

All say "aye" ??????
User avatar
RecursiveS
Site Admin
 
Posts: 1236
Joined: Thu Sep 18, 2003 8:33 am
Location: Dorset, UK

Postby exomo » Sun Sep 05, 2004 10:41 am

Sorry, I couldn't submit. I had too much work last week so I wasn't able to complete my animal. Perhaps next time.
User avatar
exomo
 
Posts: 881
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Corsix » Sun Sep 05, 2004 11:14 am

OK, I am about to test the animals from the three people who submitted:
r4nd0m
Roboticguy_2
Zen

And yes, splitting of the topic would be a good idea.
Code: Select all
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}
User avatar
Corsix
 
Posts: 1181
Joined: Fri Jul 23, 2004 9:33 am
Location: Berkeley, UK

Postby Zen » Sun Sep 05, 2004 11:28 am

Only three :?

What happend with oliver??
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

Postby Corsix » Sun Sep 05, 2004 12:15 pm

OK, the results table from 1st to last:

1st - Roboticguy2_RabidChipmunk (Herbivore)
2nd - ZenHerbi (Herbivore)
3rd - r4nd0m_GreenMankis (Herbivore)
r4nd0m_RedMankis (Herbivore)
r4nd0m_Phalarope (Herbivore)
Corsix_Herbi (Herbivore)
Corsix_BetterCarni (Carnivore)
Corsix_Carni (Carnivore)

Funny how people submitted only Herbivores! Well done to all those who entered :D If you want to show other people your source code then PM me and I will post a link to it (or you can host it and link to it yourself). I shall now make some changes to the core of the code, then make a new thread with adjusted rules and settings and a new deadline.

Thanks for all your support, bug reporting, etc. :D
Code: Select all
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}
User avatar
Corsix
 
Posts: 1181
Joined: Fri Jul 23, 2004 9:33 am
Location: Berkeley, UK

Postby Zen » Sun Sep 05, 2004 2:59 pm

Congratulate Roboticguy2 :D

How many ticks did you run? And how long did it take?
Funny how people submitted only Herbivores!

That's because they are absolutly best ... or at least easies to make.

Looking forward to the new round! :D
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

Postby Corsix » Sun Sep 05, 2004 3:15 pm

Zen wrote:How many ticks did you run? And how long did it take?
Well, I started with all animals in a bloodbath, however at about turn 138 roboticguy's animal had about 2000 more than everyone put together. Thus, so that it wouldn't take a week, I called him the winner and started a new match with all but him. Then on turn 173 of the new match, your animal had 2000 more than anyone else so I declared you second and had a new match with all remaining animals. That match ran to the 1000th turn.
Code: Select all
#include <stdio.h>
char*_="XxTIHRCXCxTIHRXRCxTIHXHRCxTIXIHRCxTXTIHRCxXxTIHRCX";
int main(int l){for(l+=7;l!=putchar(010);++l);if(*(++_))main
(*_!=88?(putchar(*_^073)|putchar(33))&1:0xffff2a8b);}
User avatar
Corsix
 
Posts: 1181
Joined: Fri Jul 23, 2004 9:33 am
Location: Berkeley, UK

Postby RecursiveS » Sun Sep 05, 2004 4:18 pm

OK. Split. :D
User avatar
RecursiveS
Site Admin
 
Posts: 1236
Joined: Thu Sep 18, 2003 8:33 am
Location: Dorset, UK

Postby r4nd0m » Sun Sep 05, 2004 5:07 pm

Anyone wanna share your breeding secrets? :D . The reason we all sumbitted herbivores is because in this world, carnivores stink. They first have to kill an animal, wasting nrg, to eat. when i tested out various carnivores with my gui, and reported if they couldn't move or eat because not enough energy, within about 20 turns they were all doing it. grass is found everywhere, so its easy to eat and keep moving, keeping your nrg high. i'm surprised only 3 people participated. kinda disappointed, actually. there was so much hype and buzz about it, now it's dead..
Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, Champagne in one hand -- strawberries in the other screaming WOO HOO!
User avatar
r4nd0m
 
Posts: 1851
Joined: Tue May 11, 2004 7:43 pm
Location: Edmonton, Alberta, Canada

Postby TheKidder » Mon Sep 06, 2004 5:01 pm

w00t! :wink:
Yeah, I'm kinda surprised that this whole thing just lost popularity. If you remember, 19 people voted yes in the poll. :shock:
As for my success, if you want to know my secret,
[SPOILER]
I think it lies in my herd strategy. The chipmunks would (should) all congregate in a group, so if another animal attacks one, even if it dies plenty other chipmunks fight it to the . Other little things helped; eating several times each turn, trying to breed with every same-species animal it saw, and its ruthlessness- practically the only reason one would run away from a fight is if it's too far away from the herd (yes, they're cowards :P ) and it would attack every different-species animal it saw.
[/SPOILER]
So, I've reavealed (almost) all my secrets, lets see some better competition next round! :twisted:

All in all, I'm still surprised I won, I never really perfected it.
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby r4nd0m » Mon Sep 06, 2004 6:09 pm

nice with the herd... i was thinking of implementing something like that, but I couldn't get it off the ground before the due date..
Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, Champagne in one hand -- strawberries in the other screaming WOO HOO!
User avatar
r4nd0m
 
Posts: 1851
Joined: Tue May 11, 2004 7:43 pm
Location: Edmonton, Alberta, Canada

Postby TheKidder » Tue Sep 07, 2004 5:37 am

I'm not even sure if mine worked, I never really tested it thourghly...
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby Zen » Tue Sep 07, 2004 3:27 pm

What code changes do you plan to make Corsix?

My suggestions:
- Levelbounds (Could be that if you move to far you end up at the opposite site, or just a simble hard border)
- Balance between herbies/carnies. (I'm pretty sure herbies are much better)
- Some kind of energi limit pr. tick.
- Code optimizing ?
Loose ideas:
- Hearing/smelling
- Disadvantage for inbreeding
- Max age
- Level terrain
- More skills (animal differes in area of sight/hearing etc.)
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

Postby r4nd0m » Tue Sep 07, 2004 4:24 pm

More ideas:
- Omnivores?
- Only allowed to do one action per tick [eat, breed, attack, etc]?
- Make attacking work the same way as defending - protected function is called [attack] when attacking, return amount of energy to attack with?
- Some kind of map of the area, so animals can remember things like watering holes, breeding grounds, feeding areas?
- Things like water [ponds, lakes], plains, forests, etc?

Questions:
- When attacking, who gets to attack first, the attacker? Or the attackee? [i'm assuming attacker]
- When's the next one gonna be held?
- When's this gonna turn into a University competition? ;)
- When are you gonna pay back the $50 you owe me? ;)
Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, Champagne in one hand -- strawberries in the other screaming WOO HOO!
User avatar
r4nd0m
 
Posts: 1851
Joined: Tue May 11, 2004 7:43 pm
Location: Edmonton, Alberta, Canada

Postby Kybo Ren » Tue Sep 07, 2004 5:05 pm

Did you already implement the idea that only 10% of the energy is transferred when you eat something?
Kybo Ren
C++ Beginner
 
Posts: 2049
Joined: Wed Feb 11, 2004 9:28 pm

Next

Return to Contests

Who is online

Users browsing this forum: No registered users and 0 guests