Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 2nd, 2003, 09:54 AM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] Judge script bugfixes

There were some errors in the judge script that was posted. One error is that in the $moves array, the last line is incorrect. Thanks to sansone for pointing it out. (this is also present in player scripts).

Another bug was lack of tokens. Thanks to maxhb. Tokens were not actually distributed, only reported in the log.

Finally, when soldiers were placed at random, again, they weren't actually placed..

I apologize for the inconvience. Updated script can be found at http://www.xs0.com/risk/judge.risk.php.txt. I'll also ask Matt to post the updated zip file.

Reply With Quote
  #2  
Old July 2nd, 2003, 11:14 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
[Risk] RE: Judge script bugfixes

I have posted a link to this thread on the contest page. Any bug fixes that come up can be posted here.

A note to participants, bug fixes are only official if posted by xs0!

Reply With Quote
  #3  
Old July 2nd, 2003, 12:12 PM
ivo ivo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: cologne,germany
Posts: 126 ivo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

$lands=trim(implode(file($map)));

should be

$lands=trim(implode("",file($map)));

Reply With Quote
  #4  
Old July 2nd, 2003, 12:14 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

It works anyway (the arguments can be reversed and if one is missing, it defaults to empty string)...

Reply With Quote
  #5  
Old July 2nd, 2003, 04:53 PM
ivo ivo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: cologne,germany
Posts: 126 ivo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

it does not work on my php 4.2.3 (running on mac os x)

Reply With Quote
  #6  
Old July 2nd, 2003, 04:59 PM
ivo ivo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: cologne,germany
Posts: 126 ivo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

just found it - it wont work with versions prior to 4.3.0

Reply With Quote
  #7  
Old July 2nd, 2003, 05:03 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

OK OK, I included the fix...

(but anyway - the official PHP version for this contest is 4.3.2, where it works fine )

Reply With Quote
  #8  
Old July 4th, 2003, 03:22 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[Risk] RE: Judge script bugfixes

Some of the maps generated with the map generator seems to end up in infinite games, running forever.

-TheRat

Reply With Quote
  #9  
Old July 4th, 2003, 03:27 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[Risk] RE: Judge script bugfixes

URL called: http: //localhost/risk/therat/risk.php?youare=a&tokens=2&alltokens=2,
x,x,0&place=32&board=a224225,a30,a1,a10,a1,a1,a11,a1,a1,a1,a1,a5, a1,a1,a1,a1,a1,
a1,a1,a1,a1,a12,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a 1,d21060,a1,a1,a1,a17,a1

Hrm.... I have enough soldiers (I am a), seems I gotta implement a better search & destroy method

TheRat

Reply With Quote
  #10  
Old July 4th, 2003, 03:34 PM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
[Risk] RE: RE: Judge script bugfixes

Quote:
URL called: http: //localhost/risk/therat/risk.php?youare=a&tokens=2&alltokens=2,
x,x,0&place=32&board=a224225,a30,a1,a10,a1,a1,a11,a1,a1,a1,a1,a5, a1,a1,a1,a1,a1,
a1,a1,a1,a1,a12,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a 1,d21060,a1,a1,a1,a17,a1
Hrm.... I have enough soldiers (I am a), seems I gotta implement a better search & destroy method
TheRat


You could benefit from the scripts I made for showing graphically what is happening on "gamelog.txt"...
at KISS map topic!

Reply With Quote
  #11  
Old July 5th, 2003, 11:33 AM
TheRat TheRat is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Forsand, Rogaland, Norway
Posts: 30 TheRat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

I did try it, great asset really, thanks.
BUT, it seems to have a problem with long logs.. I ran the judgescript for a few hours last night ( > 400K turns) and it seems it cant read further than about 50 turns..

-TheRat

Reply With Quote
  #12  
Old July 7th, 2003, 01:19 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: RE: Judge script bugfixes

I included the draw rule into the judging script, and also added support for graphical viewing of games (you'll need the zip file for this)

http://www.xs0.com/risk/risktest.zip
http://www.xs0.com/risk/judge.risk.php.txt

Reply With Quote
  #13  
Old July 8th, 2003, 04:19 PM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
[Risk] RE: Judge script bugfixes

Very nice board, xs0, as well as your good overall work in this contest.

At first I thought I had the honour to have my humble table map included...
But yours is fine.

However I still like mine the best, I even have a (very easy) variant to show more info on what's going on...

Also I made a couple bugfixes. (Last turn & show some border between 16 and 17)

About 10-turn draw rule... it's nice but draws are going to be rather common, I think.

Reply With Quote
  #14  
Old July 9th, 2003, 02:10 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[Risk] RE: Judge script bugfixes

I'd like to participate. I got the demo all up and running...my problem is this...the author of the demo code does nothing to comment what he has done...I don't even know what the functions do. Some names give hints...

I could go in and try to pick it all apart...


Reply With Quote
  #15  
Old July 9th, 2003, 02:43 AM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: Judge script bugfixes

Quote:
About 10-turn draw rule... it's nice but draws are going to be rather common, I think.

Why do you think so? A deliberate draw only helps the weaker player, and the stronger player should be able to conquer a land in 10 turns, I think... When I play against a computer, I usually win by turn 10 ;)
Quote:
the author of the demo code does nothing to comment what he has done

well, it's not demo code it's only meant to help you test your own script...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [Risk] Judge script bugfixes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump