SunQuest
           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 August 13th, 2003, 08:54 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
[Spades] The hex (lookalike) values table

Is it really supposed to be that messy, or did someone forget to have their beauty sleep?

(The nrs are very wierd, like 1-2-3-4-6 etc. I can understand that it jumps from 0, 16, 32, 48 etc.)

-TheRat

Reply With Quote
  #2  
Old August 13th, 2003, 05:01 PM
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
[Spades] RE: The hex (lookalike) values table

Found my answer in another post...

Well, my player is done (v1 atleast)..
Seems I gotta write myself a judge to test it :p
But I really dont have anything to compare it to tho, which is a bit of a problem :p

-TheRat

Reply With Quote
  #3  
Old August 14th, 2003, 04:59 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
[Spades] RE: The hex (lookalike) values table

The values are that way for simple bit-math stuffs..

$suit = $value >> 4;
$rank = $value & 16

Reply With Quote
  #4  
Old August 14th, 2003, 07:11 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
[Spades] RE: The hex (lookalike) values table

actually,

$rank = $value & 15


Reply With Quote
  #5  
Old August 14th, 2003, 09:41 AM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
[Spades] RE: The hex (lookalike) values table

what does the >> operator do? Why are the hex codes being mentioned on the chart when the script is passing integers?


Reply With Quote
  #6  
Old August 14th, 2003, 09:53 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
[Spades] RE: The hex (lookalike) values table

>> is a shift right operator, meaning it shifts the bits of a number bits. Each shift is equal to (integer) division by 2. So, 16>>2 is 4, and 256>>5 is 8. The hex codes are being mentioned so you can see the pattern. It was designed this way so that comparing ranks and/or suits is easy.

Reply With Quote
  #7  
Old August 14th, 2003, 10:17 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
[Spades] RE: The hex (lookalike) values table

er ya sorry.. my mistake!

I caught it though when I wrote the judging script.

Is that sub-contest still on?

Reply With Quote
  #8  
Old August 14th, 2003, 10:24 AM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
[Spades] RE: The hex (lookalike) values table

I understood the comparison but I guess since it's spades and not a bidding for trump game like bridge I didn't see the benefit of comparing suits and I've never used the shift right operator.

I have another question: are you going to pass the score to the scripts at anytime? If you play first on the last trick your script will currently not be aware of whether it made it's bid in some cases and without knowing the game situation it makes very little sense to go blindnil.

Reply With Quote
  #9  
Old August 14th, 2003, 10:58 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
[Spades] RE: The hex (lookalike) values table

I can't believe I forgot that ...

Yeah, I'll make an official update to parameters to include scoring information...

Reply With Quote
  #10  
Old August 14th, 2003, 12:36 PM
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
[Spades] RE: The hex (lookalike) values table

Ey! I made a workaround, using mydata etc, and NOW you tell me! How rude :p

-TheRat

Reply With Quote
  #11  
Old August 14th, 2003, 12:37 PM
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
[Spades] RE: The hex (lookalike) values table

Oh, mybad.. I confused score with ticks :p

Reply With Quote
  #12  
Old August 14th, 2003, 09:04 PM
jaspax jaspax is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Seattle, WA USA
Posts: 16 jaspax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to jaspax Send a message via Yahoo to jaspax
[Spades] RE: The hex (lookalike) values table

I was just about to post and complain that my scripts were confused about the current score, which made them act oddly . Unfortunately, I'll now have to update my judge script (which is currently in the middle of a test run).

Reply With Quote
  #13  
Old August 14th, 2003, 09:11 PM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
[Spades] RE: The hex (lookalike) values table

you can determine score from tricks but not if you don't know who won the last trick which will happen alot even if you know what cards are left you can't always be sure who played them.


Reply With Quote
  #14  
Old August 15th, 2003, 05:55 PM
jaspax jaspax is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Seattle, WA USA
Posts: 16 jaspax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to jaspax Send a message via Yahoo to jaspax
[Spades] RE: The hex (lookalike) values table

There's also the problem of incomplete games. A match between two players will probably not end at the same time as a game. (Here "game" is being used to mean "that which starts over every time one team gets to 500 or -200". What the contest rules refer to as a "game" I usually call a "hand".) The information given to the script doesn't give it any way to know when a new game starts, which is of course important for strategy.

In any case, I suggest the following structure for a score parameter:

php Code:
Original - php Code
  1.  
  2. $score = array(
  3. your_score => 125,
  4. your_bags => 3,
  5. their_score => 236,
  6. their_bags => 5
  7. );


Which on the query string looks like 'score=125,3,236,5'. This is how I'll implement my judge script until the official spec gets posted.

Reply With Quote
  #15  
Old August 16th, 2003, 02:41 AM
webhappy webhappy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Silicon Valley, CA, USA
Posts: 203 webhappy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Spades] RE: The hex (lookalike) values table

I thought your bag count is simply score%10 (the units digit basically)... Admittedly, it's possible to go over by 11 when you had 9 bags before a hand, but that's very unlikely.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [Spades] The hex (lookalike) values table


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