Path: ibmpcug!irene.pcug.co.uk!plug.news.pipex.net!pipex!tube.news.pipex.net!pipex!tank.news.pipex.net!pipex!howland.reston.ans.net!news.starnet.net!wupost!ukma!nntp.memphis.edu!nntp.rhodes.edu!hal.mathcs.rhodes.edu!graham Newsgroups: rec.games.corewar Subject: Help with Round 4 Message-ID: <1995Oct31.090503.3008@rhodes> From: graham@hal.mathcs.rhodes.edu (Randy Graham) Date: 31 Oct 95 09:05:02 -0500 Nntp-Posting-Host: hal.mathcs.rhodes.edu X-Newsreader: TIN [version 1.2 PL2] Lines: 150 OK, for those of you entering the tournament that haven't made your test data yet, here is the collection I am using for the sorting problem. Note this covers the four cases that will surely be covered: Sorting an already ordered list, sorting a list already sorted in reverse order, sorting a list of identical items, and sorting a list of random data. All of these have the a-field with #1. I recommend running them with an a-field of 0 for no deletes, and an a-field of 2 or -1 to make sure your routine works for all non-zero values. Same with the b-field - use 0 and non-zero values to test. I also threw in a test case of almost identical data, with only one item different. I don't know if this will be used or not, but it is a good general case which may catch some problems in your sorter. I am still working on the sort, so I can't give any help there. But on the already sorted list, I can delete duplicates, close gaps, and put the end-of data marker in under 200 rounds. I think this can be improved, and I am working on it, but this should give everyone an target on this data. These test data sets were written as runnable warriors, so you can use pShell to start this warrior at 4000 (per the rules) and it will run until your sorter finishes. If done right, consort should win every round, so make sure this happens or your sorter is not written correctly. Randy ----------------------------------------------------------------- ;redcode-94 ;name Consort ;kill Consort ;author Randy Graham ;contact graham@mathcs.rhodes.edu ;NSFCWT round 4 ;assert 1 ;strategy data for consortium ;strategy Data already in order flagline jmp.a #1, 2 ;a=1 to delete, b=1 for descending dat.f 3, 3 spl.b #3, <3 dat.f 3, 3 spl.a #2, <3 mov.i 1, *2 djn.b 1, >1 spl.a 0, <1 jmp.a 0, 0 slt.f >0, *0 jmp.a 0, 0 end flagline ----------------------------------------------------------------- ;redcode-94 ;name Consort ;kill Consort ;author Randy Graham ;contact graham@mathcs.rhodes.edu ;NSFCWT round 4 ;assert 1 ;strategy data for consortium ;strategy data in reverse order flagline jmp.a #1, 0 ;a=1 to delete, b=1 for descending dat.f 3, 3 spl.b #3, <3 dat.f 3, 3 spl.a #2, <3 mov.i 1, *2 djn.b 1, >1 spl.a 0, <1 jmp.a 0, 0 slt.f >0, *0 jmp.a 0, 0 end flagline ----------------------------------------------------------------- ;redcode-94 ;name Consort ;kill Consort ;author Randy Graham ;contact graham@mathcs.rhodes.edu ;NSFCWT round 4 ;assert 1 ;strategy data for consortium ;strategy data identical flagline jmp.a #1, 0 ;a=1 to delete, b=1 for descending dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 end flagline ----------------------------------------------------------------- ;redcode-94 ;name Consort ;kill Consort ;author Randy Graham ;contact graham@mathcs.rhodes.edu ;NSFCWT round 4 ;assert 1 ;strategy data for consortium ;strategy random data flagline jmp.a #1, 2 ;a=1 to delete, b=1 for descending jmp.a 0, 0 spl.b #3, <3 slt.f >0, *0 dat.f 3, 3 mov.i 1, *2 spl.a 0, <1 dat.f 3, 3 spl.a #2, <3 jmp.a 0, 0 djn.b 1, >1 end flagline ----------------------------------------------------------------- ;redcode-94 ;name Consort ;kill Consort ;author Randy Graham ;contact graham@mathcs.rhodes.edu ;NSFCWT round 4 ;assert 1 ;strategy data for consortium ;strategy only one data item differs flagline jmp.a #1, 2 ;a=1 to delete, b=1 for descending dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 spl.b #3, <4 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 dat.f 3, 3 end flagline