Register  |  FAQ  |  Search  |  Memberlist  |  Log in 
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.
POTM-MASTER


Joined: 24 Aug 2004
Posts: 629
Location: New Jersey, USA
Reply with quote
my fault - mjs sent it and I haven't found much free time ... will post here
when I make it available ...

It's at: http://dinsights.com/POTM/LOAPS/SOURCE/

(the page isn't too pretty, but it should be functional! Will prolly put a
few other things there as well)

_________________
=Fred (The omnipotent POTM-MASTER)
View user's profileSend private messageVisit poster's website
Tominator


Joined: 20 Nov 2004
Posts: 33
Location: Belgium
Reply with quote
Thanks, i got it working on my windows box. Time isn't going down though, but i can live with that.

Kind permission to peek at (and then probably use) your 'isconnected' routine mjs? Or is that against rules (I haven't peeked yet, so no harm done)? I have on of my own, but i fear it'll be slow.
View user's profileSend private message
mightybyte
POTM WINNER

Joined: 17 Sep 2004
Posts: 126
Reply with quote
Tominator wrote:

Kind permission to peek at (and then probably use) your 'isconnected' routine mjs? Or is that against rules (I haven't peeked yet, so no harm done)? I have on of my own, but i fear it'll be slow.


This from the guy who has the fastest Python entry in the systest. LOL.

MightyByte

P.S. I do know that the systest is meaningless, but still couldn't resist the irony. Smile
View user's profileSend private message
Tominator


Joined: 20 Nov 2004
Posts: 33
Location: Belgium
Reply with quote
Mightybite: heheh Smile
Actually that's also mjs's polas with a method just a bit better than randomly selecting where to go Very Happy
View user's profileSend private message
hagman
POTM WINNER

Joined: 14 Sep 2005
Posts: 119
Location: Bonn, Germany
Reply with quote
mightybyte wrote:
Tominator wrote:

Kind permission to peek at (and then probably use) your 'isconnected' routine mjs? Or is that against rules (I haven't peeked yet, so no harm done)? I have on of my own, but i fear it'll be slow.


This from the guy who has the fastest Python entry in the systest. LOL.

MightyByte

P.S. I do know that the systest is meaningless, but still couldn't resist the irony. Smile

Yeah, and "fast isconnected routine" is meaningless as well: My corresponding routine "CountComponents" appears to take typically about 760ns (in my debugging environment, which is slightly slower than the sandbox) and I dare assume that a mere referee will have a slower routine. Anyway, my proggy allows itself more time to spend with a short game than Tominator's with a long 50 move game (looks like I'm rather competing for the slowest win-both-games entry Wink ).

I!m already afraid that the final tournament will be dominated by lots of winning python entries, once they start making use of the allowed 60 seconds...

Hagman
View user's profileSend private message
Tominator


Joined: 20 Nov 2004
Posts: 33
Location: Belgium
Reply with quote
Indeed my 50d is bad, i know :p I'm working on it.
View user's profileSend private message
Reply to isconnected() code request
mjs


Joined: 12 Sep 2004
Posts: 45
Location: Canberra, Australia
Reply with quote
Hi Tominator,
I am happy you have Harrigan working on a windows box, but puzzled as to why the time function does not work. Any python-on-windows people that can help?

I provided "polas" as a framework that programmers (possible new to python) could try out and modify. In accordance with the POTM-MASTER's wishes, I did not include any game playing logic (other than a generator of valid (but not good (yikes - parenthesis out of control...)) moves). I suspect using the "isconnected()" code violates the spirit (if not the letter) of the rules. I have no problem with anyone using or modifying all-of or parts-of polas or harrigan for any POTM-related purpose, but it is the POTM-MASTER's decision....

If harrigan users have made changes, found bugs, need clarification, or would like an enhancement, please add a note here or send me a private message. I will try to help.

_________________
~~~~~~~~
Mike
View user's profileSend private message
Tominator


Joined: 20 Nov 2004
Posts: 33
Location: Belgium
Reply with quote
Thanks mjs. I've decided not to look and make my own. It's fast enough in my opinion. You may judge it when the contest is over Wink
BTW: I dislike parenthesis as well. As a first-time pythonner, I still get plenty of errors when doing board.get(x, y) instead of board.get((x, y)), even though I know that and why the first is wrong Very Happy
View user's profileSend private message
gsakkis


Joined: 30 Jun 2005
Posts: 7
Location: New Jersey, USA
Reply with quote
Tominator wrote:
BTW: I dislike parenthesis as well. As a first-time pythonner, I still get plenty of errors when doing board.get(x, y) instead of board.get((x, y)), even though I know that and why the first is wrong Very Happy


I have the impression that he was talking about the nested parenthesis in his comment, not the program Wink BTW, if using tuples instead of plain coordinates is really annoying for you, you can always make board a dict subclass and override get:
Code:

class Board(dict):
 
    def get(self, x, y):
        return dict.get(self, (x,y))

_________________
It might look like I'm doing nothing, but at the cellular level I'm really quite busy.
View user's profileSend private message
sven.reichard


Joined: 28 Apr 2005
Posts: 126
Location: Perth, Western Australia
Reply with quote
Tominator wrote:

BTW: I dislike parenthesis as well. As a first-time pythonner, I still get plenty of errors when doing board.get(x, y) instead of board.get((x, y))


Try ruby!
Code:

board.get x, y


Cool

Sven.
View user's profileSend private message
Don't Worry
mightybyte
POTM WINNER

Joined: 17 Sep 2004
Posts: 126
Reply with quote
hagman wrote:

I!m already afraid that the final tournament will be dominated by lots of winning python entries, once they start making use of the allowed 60 seconds...


Hmmmm, I would say that SYSTEST3 should comfort you a little. Very Happy
View user's profileSend private message
Tominator


Joined: 20 Nov 2004
Posts: 33
Location: Belgium
Reply with quote
Yes systest3 is hard, whoever it is. But at least it gives a new challenge. Winning from sys2 was too easy apparently Smile
View user's profileSend private message
Updated harrigan ...
POTM-MASTER


Joined: 24 Aug 2004
Posts: 629
Location: New Jersey, USA
Reply with quote
Mike has updated his referee program and I've posted it to the
"code" secion of the LOAPS pages ...

http://dinsights.com/POTM/LOAPS/code.php

Thanks Mike!

_________________
=Fred (The omnipotent POTM-MASTER)
View user's profileSend private messageVisit poster's website
LOAPS referee program
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 4 Hours  
Page 2 of 2  

  
  
 This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.