From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13717fdb90d942 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Would someone help a struggling ADA student Date: 1998/10/07 Message-ID: <6vfrn0$2sb$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 398615387 References: <6v3c4q$890$1@news.campus.mci.net> <6vaj7d$nht$1@owens.ridgecrest.ca.us> <6vatvr$329$1@nnrp1.dejanews.com> <6vd963$m9s$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x5.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Oct 07 13:52:32 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I) Date: 1998-10-07T00:00:00+00:00 List-Id: In article , Robert A Duff wrote: > dennison@telepath.com writes: > > > ...except that the programs have to be linked together to play each other. I > > suppose that could be done with pipes or shared memory or something, but the > > easiest way would be to compile and link them into one exectuable. ... > > And does my code "win" if it causes the opponent's code to raise an > unhandled exception? > > Or how about a more suble way to cheat? My code pokes the output of the > opponent's code in such a way as to make it do bad moves. Hmm. Sort of Battleship meets corewars.... I suppose you could allocate up all free heap memory and hope his code bombs. :-) Personnaly I'd consider "cheating" the same way a human player would...by moving the ships around. In fact, I'd be willing to bet that the instructor's "undefeated" algorithm does just that. One important real world lesson students can learn from this...its not cheating if the system specification lets you do it. :-) -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own