[EuForum] Definition of insanity...

new topic     » topic index » view thread      » older message » newer message

Doing the same thing twice and getting different results...

Working on the contest engine... 

I have 3 bots set up to run a game. Each is given its own identity at
startup. (12 letter random string, and an incremental number)

When the engine calls a procedure in one of the bots, it does its
business, then calls a notify procedure in the engine to signify that
it's done.

The notify procedure receives the number from the bot, and increments
an appropriate flag element (there's 1 for each bot)

After a certain amount of time, the engine breaks out of the loop,
checks the notification flags, and aborts if one of the bots didn't
respond.

Got that?

Somehow, the data is getting mixed up in the IPC library. The correct
identities are being sent to the correct bots, each bot is sending
their own identity, but at the engine end:
(Say with three bots)
The engine is receiving the first two messages correctly.
The third message is a duplicate of the second. And I mean, *exact*
duplicate. So, rather than flagging 1,3,2 (which is success), it might
flag 1, 3, 3!
This is not a bot problem, I've checked that they're each sending
different data...
By the time it gets to the notify function, the 3rd piece of data has
been messed up already, it seems to be a problem with the ipc.ew
library.


So why the subject line? Well, sometimes it works fine, sometimes it
does this!! I can't figure out the common factors, let alone the
problem...

If anyone would like to have a crack at solving this, I can email your
the source code...
If it can't be fixed, no contest!
-- 
MrTrick

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu