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 Zen » Sat Aug 28, 2004 5:40 pm

Thanks, that worked. (I thought I had tried it, but must have messed up)

Anyway, doesn't dynamic_cast throw an exception when it fails? I've heard exceptions are slow (?) (not that it matters all that much)

btw: sorry for messing up this thread
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

abusing the system?

Postby oliver » Sat Aug 28, 2004 5:55 pm

hello, this contest sounds really fun.( i just stumbled upon it searching an unrellated topic ). anyhow, i feel like an idea i had kind of abuses the system, lets say an animal of mine sees another, it can now remember the animal's reference, so it can tell the other animal which direction and distance it moved no matter how far apart they are, and the animal can have a kind of radar on all animals of its species that it's bumped into. thanks for any help with this issue.
oliver
 

Re: abusing the system?

Postby Zen » Sat Aug 28, 2004 6:17 pm

Welcome! :D

No, you couldn't. Check DirectionOf and DistanceTo. The distance is beeing checked in both. (If you didn't had another clever way of doing it? (in that case pm me :wink: ))
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

Postby Beer Hunter » Sat Aug 28, 2004 6:28 pm

Zen wrote:Thanks, that worked. (I thought I had tried it, but must have messed up)

Anyway, doesn't dynamic_cast throw an exception when it fails? I've heard exceptions are slow (?) (not that it matters all that much)

btw: sorry for messing up this thread
Dynamic_cast to a pointer type will result in a null pointer if it fails. Dynamic_cast to a reference type will throw std::bad_cast if it fails.
User avatar
Beer Hunter
 
Posts: 912
Joined: Sat Dec 13, 2003 7:12 pm
Location: Australia

stickin' it to the "man" (joke)

Postby oliver » Sat Aug 28, 2004 6:35 pm

what i meant is one animal (A) decides to move north by 5 units right? so he tells another animal (B), then moves. the animal (B) knows that (A) just moved 5 units north relative to himself. so if say (B) moved south by 5 units, he knows that (A) is 10 units north of himself... do you get what i mean? (B) keeps track of where (A) is moving to figure out the distance... i think that makes sense right? i could be wrong (it's happened before)... but anyway, maybe only allowing communication between animals to occur in a specific say() and hear() kind of functionality might solve this? (where the functions only work over a given range? does all this make sense? :?:
oliver
 

Postby r4nd0m » Sat Aug 28, 2004 9:19 pm

he would know that only while the animal is visible to him. if an animal is over a certain distance away, you can't see him anymore, and can't track his position [you can still track your's relative to his, but you will lose total track of him].
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

same as before

Postby oliver » Sun Aug 29, 2004 1:27 am

yeah, i guess it's probably no big deal anyway, being able to talk to far away animals, that is. i guess the issue i had was probably more philosophical than practical. i mean in theory, you could maybe have some guys go in all directions and scout out the map, or something like that, to get some kind of a picture of things... or maybe a weak guy calls for some backup from far away, or something... but realistically, if i entered this contest, my creatures would just walk in random directions and get wiped out... greenpeace would call it a disaster :lol:
oliver
 

Postby Corsix » Sun Aug 29, 2004 3:34 am

Zen: Check the function AnimalGroup() - it should return AGHerb or AGCarn .
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 Guest » Sun Aug 29, 2004 1:04 pm

Corsix wrote:
RecursiveS wrote:As I understand it, all the header files will be included into the same virtual world, a number (20) of each animals spawned and then.....MAYHEM!!!!!!

Correct


So we must have 5 (different) animals? It wouldn't be nice to fight 20 of my only species against 5*20 of another creator.
Guest
 

Postby exomo » Sun Aug 29, 2004 1:15 pm

Sorry, the above was mine.

I hope my animal(s) will do a good job. But I fear they are killed very fast.
I think there is no breed-restriction yet, so what if my animal accidentaly breeds too much? (I managed to double my animals every round).

Sorry for all these stupid questions, but I#m still not sure about the contest.
User avatar
exomo
 
Posts: 880
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Corsix » Sun Aug 29, 2004 1:44 pm

exomo wrote:I hope my animal(s) will do a good job. But I fear they are killed very fast.
I think there is no breed-restriction yet, so what if my animal accidentaly breeds too much? (I managed to double my animals every round).

Breed restriction: None - how can it breed too much?

You can submit upto 5 animals . So you coudl submit 5 or 1 or 2 or 3 or 4.
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 exomo » Sun Aug 29, 2004 2:05 pm

Corsix wrote:
exomo wrote:I hope my animal(s) will do a good job. But I fear they are killed very fast.
I think there is no breed-restriction yet, so what if my animal accidentaly breeds too much? (I managed to double my animals every round).

Breed restriction: None - how can it breed too much?

You can submit upto 5 animals . So you coudl submit 5 or 1 or 2 or 3 or 4.


Too much would be if your computer cant get it any more. My computer takes several minutes for every round at round 40 (so imagine round 1000)

What if I have only 1 animal and another one has 5?
User avatar
exomo
 
Posts: 880
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Postby Darobat » Sun Aug 29, 2004 3:29 pm

Wow! Congrats to Corsix on a 10 page topic. lol!
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby r4nd0m » Sun Aug 29, 2004 4:05 pm

Then, theoretically, the other guy would have a better chance of winning. However, if all his species blow, and your's is godlike, you'll prolly be number one!
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 Zen » Sun Aug 29, 2004 4:22 pm

exomo wrote:Too much would be if your computer cant get it any more. My computer takes several minutes for every round at round 40 (so imagine round 1000)

Yeah, I know. It will take a month to run the contest (if all animals breed well)
User avatar
Zen
 
Posts: 1088
Joined: Wed Sep 24, 2003 1:41 am
Location: Norway

PreviousNext

Return to Contests

Who is online

Users browsing this forum: No registered users and 0 guests