Current Contest
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsCurrent Contest

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:
  #16  
Old September 25th, 2004, 08:18 PM
zackcoburn zackcoburn is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 184 zackcoburn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Maps & Tools

Quote:
An example of why the diagonals have to be more expensive:
This:
0000000000
0000001000
0000010122
0000100022
0001000000
0010000000
2200000000
2200000000
Should cost more than:
0000000000
0000000000
0000011122
0000100022
0001000000
0010000000
2200000000
2200000000


I think the confusion is resulting from improper notation. A "1" should represent a room, while a "2" should represent a corridor.

If you interchanged these two numbers, your scoring for

Quote:
00000
01010
00200
00100
00000


as 3*10+2*4 would be correct.

Reply With Quote
  #17  
Old September 25th, 2004, 08:22 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: RE: Maps & Tools

your scoring is ok, but i don't get this part:

Quote:
But using the scoring method DDY and Zack have described, that would not be the case. If you want to consider a diagonal to be something other than a corridor, then consider it to cost 14 points each.


what is wrong with DDY's and Zack's scoring?

Reply With Quote
  #18  
Old September 25th, 2004, 08:50 PM
jcaughel jcaughel is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Buffalo, NY, USA
Posts: 283 jcaughel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 4 sec
Reputation Power: 2
Send a message via ICQ to jcaughel Send a message via AIM to jcaughel Send a message via Yahoo to jcaughel
RE: Maps & Tools

Ahh... very sorry... my confusion...

I was using the wrong numbers for rooms and corridors.

Been a very long week :-[

-Jeff

Reply With Quote
  #19  
Old September 25th, 2004, 09:47 PM
DDY DDY is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Rouen, 76, FRANCE
Posts: 25 DDY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Maps & Tools

online applet updated to new map size(50x50) ;)

Reply With Quote
  #20  
Old September 27th, 2004, 02:27 PM
chiby chiby is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 chiby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: RE: Maps & Tools


Quote:
You're right, I made a mistake; the right count is: 21*10 + 26*4 = 314

To make things clear, what is the cost of that:
00000
01010
00200
00100
00000

I think it's: 1*10 + 2*4 = 18
Am I wrong ?


I think this is wrong. How could the diagonal only cost 4?

I think it's:
3*10 + 2*4 = 38
or the long way
10 + 14 + 14 = 38

Am I correct or not?

Reply With Quote
  #21  
Old September 27th, 2004, 04:09 PM
DDY DDY is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Rouen, 76, FRANCE
Posts: 25 DDY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Maps & Tools

Quote:
Your script will be passed a 50*50 two-dimensional array, in which each wall block will be represented by a "0" and each room block will be represented by a "1". Your script should return the same map array, with corridors added to connect the rooms. Each corridor in the new map array should be represented by a "2", and should replace a wall block ("0").

Each corridor block will add 10 to the cost, and each diagonal corridor will add another 4 to the cost.

A diagonal corridor is a corridor block that connects to another corridor block or room block across a corner where the other two quadrants are wall blocks.


In this sample, there is only 1 corridor block!
0 (black) : wall block
1 (orange): room block
2 (green) : corridor block

Reply With Quote
  #22  
Old September 27th, 2004, 08:49 PM
FryGuy1013 FryGuy1013 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Antelope, Ca
Posts: 45 FryGuy1013 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to FryGuy1013 Send a message via AIM to FryGuy1013 Send a message via Yahoo to FryGuy1013
RE: Maps & Tools

Perhaps the difficulty is that horizontal/verticals do not cost anything other than to bore out the room, versus diagonals cost to knock out a cooridor. If we use 10x + 4y for the costs, then x would be the number of 2's in the room array, while y would be the number of diagonals required to join the 2's that aren't connected horizonatally/vertically. Am I right? GIven the following:
Code:
01110111
01110111
00020200
00002000
00011110
00111111


It would have a cost of 3*10 (number of 0 converted to 2) + 2*4 (number of "diagonals" = 38

Or would this be: 10*3 (3 horiz/vert corridors) + 14*2 (2 diagonal corridors) = 10*5 (total corridors) + 4*2 (diagonal) = 58

Reply With Quote
  #23  
Old September 27th, 2004, 11:10 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Maps & Tools

38 is correct.. (but there is a cheaper solution of 28 ;))

Reply With Quote
  #24  
Old September 28th, 2004, 09:52 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
RE: RE: Maps & Tools


Quote:
Code:
01110111
01110111
00002000
00002000
00011110
00111111



this is the cheaper solution. 2*10 + 2*4

part of the confusion is that each corner to corner connection of 1's and 2's is counted as a diagonal. Each time you use a 2 it count's 10 points and each time it makes a connection to another 2 or two a one on the corner it counts as +4 (this simulates 1.414 which is the sqrt(2)).

so one corridor that touches 3 rooms on corners counts as 22, ten for the block and 3*4 for the corner connection.

001101100
001101100
000020000
001100000
001100000

Reply With Quote
  #25  
Old September 28th, 2004, 04:31 PM
BondGamer BondGamer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 53 BondGamer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Maps & Tools

This thread has me totally confused on the scoring. If people can't even agree on what

00000
01010
00200
00100
00000

is I think we need a better explination.

Reply With Quote
  #26  
Old September 28th, 2004, 06:37 PM
sundown sundown is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Boulder, CO, USA
Posts: 4 sundown User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 23 sec
Reputation Power: 0
RE: Maps & Tools

Fairly certain that the above example is worth 18...

Reply With Quote
  #27  
Old September 28th, 2004, 08:39 PM
jcaughel jcaughel is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Buffalo, NY, USA
Posts: 283 jcaughel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 4 sec
Reputation Power: 2
Send a message via ICQ to jcaughel Send a message via AIM to jcaughel Send a message via Yahoo to jcaughel
RE: Maps & Tools

Concur - I was wrong when I initially questioned that example... I was using the wrong numbers for rooms and corridors.

-Jeff

Reply With Quote
  #28  
Old September 29th, 2004, 10:19 AM
ufosh ufosh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: lublin, poland
Posts: 7 ufosh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Maps & Tools

just to be sure.

01010
01210
00020
00010

is it 20 or 24?


Reply With Quote
  #29  
Old September 29th, 2004, 10:50 AM
lukir lukir is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Austria / Salzburg
Posts: 1 lukir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to lukir
RE: Maps & Tools

its 20

Reply With Quote
  #30  
Old October 2nd, 2004, 12: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
RE: Maps & Tools


an example (1 - room, 2 - path)
121
102
202
011

will be added 4 points for diagonal, even if we have alternative path?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsCurrent Contest > Maps & Tools


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