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:
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 October 4th, 2004, 08:36 AM
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
two or more perfect scripts

i think its possible to write a 'perfect' solver.
will time make the winner (per map, overall)?
or is it possible, that there will be more than one winner?

Reply With Quote
  #2  
Old October 4th, 2004, 03:30 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: two or more perfect scripts

time will be the judge in that case..

(and i don't think that there will be any "perferct scripts" ;)

Reply With Quote
  #3  
Old October 5th, 2004, 06:03 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
RE: RE: two or more perfect scripts


Quote:
(and i don't think that there will be any "perferct scripts" ;)


its hard (if not impossible) to prove, but i think im almost there .
currently im having a problem with one type of map only (maybe there are more, that i havent discovered yet...).
something as simple as:
101
000
101

these patterns are quite unlikely to occur in random maps.
so, next question:
will all maps be generated, or will you provide some handmade maps (or code the generator to spit out some difficult maps)?

Reply With Quote
  #4  
Old October 5th, 2004, 10:43 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: two or more perfect scripts

Quote:
its hard (if not impossible) to prove

A perfect script is fairly trivial to write - just try all possible combinations of corridors. Of course, the time constraint renders that approach useless.

Is this contest NP? NP-complete?

Reply With Quote
  #5  
Old October 6th, 2004, 06:31 AM
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
RE: RE: two or more perfect scripts


Quote:
A perfect script is fairly trivial to write

sure, its possible to prove, that a specific map is solved perfectly.
but its hard to prove, that a given script (eg mine) will solve all possible maps perfectly.

Quote:
Is this contest NP? NP-complete?

even this is hard to prove ;-)

Reply With Quote
  #6  
Old October 6th, 2004, 02:10 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: two or more perfect scripts

Ahhh... But it already has. The solution to this contest is basically what is called a steiner tree and has been proven to be NP complete, although with this small number rooms it should be fairly trivial to find the exactly solution.

http://infoshako.sk.tsukuba.ac.jp/~tohyama/graph/emsteiner.html
http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK4/NODE181.HTM
http://www.css.tayloru.edu/~bbell/steiner/
http://www.google.com/search?hl=en&q=steiner+tree+algorithm&btnG=Google+Search

Reply With Quote
  #7  
Old October 6th, 2004, 03:44 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: two or more perfect scripts

Doh! It looks like this contest may have to be canceled. Unless they put in a rule you can't use the Stiener formula.

Reply With Quote
  #8  
Old October 6th, 2004, 03:48 PM
Dios Dios is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Garching, Bavaria, Germany
Posts: 88 Dios 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 Dios
RE: two or more perfect scripts

I don't think it has to be canceled, they just have to make the running time more important, or who has the shortes implementation ( in script-length ) ?! ;)

Reply With Quote
  #9  
Old October 6th, 2004, 04:42 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: two or more perfect scripts

If some scripts are running less then a second and all achieving the same best score I doubt timing would be measurable. The whole point of these contests are to figure out the best possible solution. Well, unfortunatly, someone has already come up with the best solution to this problem. So unless you are a rocket scientist and can produce a better formula then Steiner everyone will be on an even keel making judging impossible.

Reply With Quote
  #10  
Old October 6th, 2004, 04:44 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: two or more perfect scripts

I forgot to add I just created a new script with the steiner forumla and I am getting < 1 second times and same score in the test your script thread. Before I was getting around 500.

Reply With Quote
  #11  
Old October 7th, 2004, 12:44 AM
free_prisoner free_prisoner is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 13 free_prisoner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to free_prisoner
RE: two or more perfect scripts

If there is a solution already for this contest "steiner tree" then how can we call it a contest?
mmm! I think it should be changed to something else,something doesn't have a known solution, so we can use our brains to solve it , instead of using Google for getting the solution ;-)

Ah, I swear i solved it before i know about "steiner tree" in < 1 sec , like everyone solved it too, I will be sad if it's canceled , but I will be more sad if someone else win by using a search engine

Reply With Quote
  #12  
Old October 7th, 2004, 04:44 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
RE: two or more perfect scripts

sigh.

ok some clarifications for those who didnt rtfa

- steiner tree problem is NP-Hard = there is no algo that runs in polynomial time for it

- the supposed algo that most pple have been using that solves in <1 sec is probably the minimum spanning tree algo. this algo only gives an *approximation to the optimal steiner tree. [mst will give 826] (the best soln in the 'test your script thread' is < 822, go figure...)

- there is no steiner tree solution, but there are good heuristics - i.e. using mst or shortest path

- this competition is still valid as the problem is now how you can use the heuristics (e.g. mst) and then improve on the solution generated by it. like by location steiner points to add.

- there are also a few differences between this competition and the actual steiner problem. the steiner problem deals with points, this one deals with blocks. the specific algorithms for the steiner tree on a cartesian plane might not apply here due to the difference in score for the diagonal corridors.

- in short, the problem is how you join the corridors together to have an even lower cost. and this problem isnt so trival

Reply With Quote
  #13  
Old October 7th, 2004, 01:42 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: two or more perfect scripts

Quote:
the steiner problem deals with points, this one deals with blocks. the specific algorithms for the steiner tree on a cartesian plane might not apply here due to the difference in score for the diagonal corridors.


it seems some of you already adapt that algorithm to rooms(not points) and perform <1s; what do you get for example on map : http://www.cigosoft.org/pub/corridors.php?fps=60&w=600&h=450&rooms=50&blocks=800&seed=1 ?

Reply With Quote
  #14  
Old October 18th, 2004, 10:24 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: two or more perfect scripts

I got 518

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsCurrent Contest > two or more perfect scripts


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


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |