Contest: Animal/Bot Coding (AI)

Online C++ programming contests.

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

Is this a good idea or not?

Poll ended at Sun Aug 22, 2004 12:10 pm

Yes
19
100%
No
0
No votes
 
Total votes : 19

Postby TheKidder » Tue Aug 24, 2004 6:36 am

It also seems to work in MSVC++ .net 2003

Just wondering, in the 'turn reports', what are the numbers stated? Is it number animals living/number animals total?

[edit]
The envirnoment shouldn't be capable of sustaining >1000 animals...grass should take a while to grow back, and animals should decay and not be eatable. Otherwise I run it and sometimes it ends after 120 turns with no lag, other times I'm on turn 300 with 2500 herbivores and 2 carnivores. :P
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby Corsix » Tue Aug 24, 2004 7:28 am

Yep it is CLASS_NAME : LIVING / TOTAL(ALIVE + DEAD)
Grass is an issue which I am looking into. As for decaying - what would the carnivores eat ?!?
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 TheKidder » Tue Aug 24, 2004 7:46 am

The carnivores would have to eat animals before they decay in a certain amount of turns, or kill another animal. Or perhaps each turn a animal would lose a small percentage of its meals
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby RecursiveS » Tue Aug 24, 2004 8:25 am

r4nd0m wrote:When I run the app w/ Corsix's 'super carnivore' it seems to win in one round. If I comment the super carnivore out, it seems to run forever, and runs so fast that I can't see it. Also, when it finishes, It doesn't print the table of winners [i'm not sure if it's supposed to do that..]


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

Postby RecursiveS » Tue Aug 24, 2004 8:40 am

and by turn 230, each tick is taking 36 seconds to process :shock:

at this rate I'll need a calender to time tick number 1000 !!!!!! :lol: :lol:
User avatar
RecursiveS
Site Admin
 
Posts: 1236
Joined: Thu Sep 18, 2003 8:33 am
Location: Dorset, UK

Postby TheKidder » Tue Aug 24, 2004 8:59 am

It *usually* runs fine for me, the herbivore wins around turn 90-300.
Unless I add my recently completed rabid chipmunk, which always goes to turn 300 or so without a winner, taking quite a few seconds per turn...
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby RecursiveS » Tue Aug 24, 2004 9:32 am

hmmmm....

I'm getting different results when I change the spawning order :shock:

If supercarni is spawned last it wins in turn one every time. If it is spawned first it doesn't. :?
User avatar
RecursiveS
Site Admin
 
Posts: 1236
Joined: Thu Sep 18, 2003 8:33 am
Location: Dorset, UK

Postby Tenji » Tue Aug 24, 2004 9:54 am

fear my crazed canabalistic teletubbies! :twisted:

I dont suppose we can have our animals eat themselves? :(
Tenji
 
Posts: 133
Joined: Sat Jul 17, 2004 10:40 pm

Postby Corsix » Tue Aug 24, 2004 10:06 am

There were some issues (Hint: RecursiveS) with certain compilers relating to template functions - D/L the latest build and follow the fix in main().
Your animals cannot eat themselves however they can attack and eat their own species.

If you still have errors then please tell me the build you are using (eg. 100, 101 or 102) , your compiler , your OS (can't hurt) and the problem.
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 TheKidder » Tue Aug 24, 2004 10:28 am

My rabid chipmunk will OWN :twisted: :twisted: :twisted:
8)
w00t!
User avatar
TheKidder
 
Posts: 525
Joined: Mon Nov 24, 2003 7:57 pm
Location: MI

Postby exomo » Tue Aug 24, 2004 10:28 am

Huh, it took me nearly a day to understand your code and now you have changed it?? I hope the changes are nor so big that I have to think it all over again or my questions are useless, but I have some questions:

1. Are we allowed to add own functions to our class? And are we allowed to call functions of another creature? (I'm thinking of communicating with creatures of the same species)

if(1.question.answer == yes)
2. can we use the AllocStats() function to init some own variables or can we just alloc speed power

3. can we acces the __int__vars map? (yes we can, but are we allowed to read its values?)
[EDIT] I want to know the world position of my animal; I couldn't find a getPosition() function anywhere)[/EDIT]

4. will there be fight with more than 1 species of the same author at once?

I hope my questions are not too conmfusing. Thanks for answers
User avatar
exomo
 
Posts: 879
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Corsix » Tue Aug 24, 2004 10:38 am

exomo wrote:Huh, it took me nearly a day to understand your code and now you have changed it??
Only bug fixes, comments and a smarter carnivore have been added.
exomo wrote:1. Are we allowed to add own functions to our class? And are we allowed to call functions of another creature?
a) You can add your own functions. b) Yes.
exomo wrote:if(1.question.answer == yes)
2. can we use the AllocStats() function to init some own variables or can we just alloc speed power
Yepp.
exomo wrote:3. can we acces the __int__vars map? (yes we can, but are we allowed to read its values?)
No. (I know what you are trying to do - u wanted LocX and LocY didnt you?) GetPosition() wasn't created for a very good reason.
exomo wrote:4. will there be fight with more than 1 species of the same author at once?
Hell yeah! 20 of each species will be spawned and then the bloodbath shall begin!!!!!!

PS. You people should read between the lines of exomo post.
Last edited by Corsix on Wed Aug 25, 2004 12:10 pm, edited 1 time in total.
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 fortysomething » Tue Aug 24, 2004 10:41 am

RecursiveS wrote:I'm really gonna try and carve some time out for this one, cos I've got a hamster that will kick butt!!!! ...........(in my head at the moment :P )


Harvey, is that you? :lol:
just because the compiler likes it doesn't mean the computer will.
fortysomething
 
Posts: 75
Joined: Tue Aug 17, 2004 5:34 am
Location: Maryland, USA

Postby exomo » Tue Aug 24, 2004 10:55 am

Corsix wrote:
exomo wrote:
3. can we acces the __int__vars map? (yes we can, but are we allowed to read its values?)

No. (I know what you are trying to do - u wanted LocX and LocY didnt you?) GetPosition() wasn't created for a very good reason.
exomo wrote:
4. will there be fight with more than 1 species of the same author at once?

Hell yeah! 20 of each species will be spawned and then the bloodbath shall begin!!!!!!


to 3: I was just thinking of "not-running into a wrong direction" If I don't know where I am I run into nowhere perhaps and I just didn't want that. But if you thinnk its better, OK

to4: That isn't what I meant. I thought of two (or more) different species of the same author. e.g. exomo_carni and exomo_herbi vs. corsix_carni and corsix_hevi
User avatar
exomo
 
Posts: 879
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby r4nd0m » Tue Aug 24, 2004 10:55 am

ok, i think maybe it's working now, but i can'tbe sure because it seems to be taking forever for turn 1 to go.. its just sitting there.. and i think i might make a win32 gui for this so we all know whats going on better.. hmm.. maybe there should be a limit on how big the world is, like boundaries so our animals don't all walk to opposite ends of the earth..
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

PreviousNext

Return to Contests

Who is online

Users browsing this forum: No registered users and 2 guests