[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Serial Cable Chat Program



> My own searching suggests I should get either an Ethernet hub
> or simply an Ethernet cable, and plug the two computers together. They're
> then supposed to automatically assign themselves IP addresses.

I've never heard of that, but there is such a thing as DHCP (Dynamic
Host Configuration Protocol, I think) which allows them to request IP
addresses from a third machine (automatically, without first having to
be told where the third machine is).

I really think that you won't have to worry about IP addresses, because
they are a part of the operating system.

> Assuming that works, how within Python can I figure out what host/port
> to connect to?

That's always passed on the command line (or via some other user input).
It's very standard: even your web browser does it. You could never
predict what IP address they're going to use on their network!

If the program isn't given a host (and maybe a port), it should output a
helpful message explaining how to provide for one.

> >The judges are going to connect via telnet and talk to your
> >system. You provide the server only...
> 
> The main program doesn't even need to use telnet; it can be a stand-alone
> program on one machine, that just looks like it isn't. The problem is that
> it needs a "matching comm program," a two-computer chat program that has
> the exact same interface.

Hmmmm, I hadn't noticed that. However, I think it would be sufficient to
say that the "comm program" is telnet. (They're providing machines with
Mac OS X, which is BSD-based and so will have telnet installed. I think
even the latest versions of Windows have telnet.) You can even provide a
telnet program, since the BSD version is open-source.

By default telnet works as the simplest of sockets. You've already
created your own socket-based communication program in Python, so you
can use that if you like. It really accomplishes the same thing.

I understand your concern about the details of the communication,
because it would be a shame to be disqualified over a technicality. But
the purpose of the competition is to test AI engines, not to test
communications protocols. So maybe you could contact someone who has
participated in this contest before to put your mind at ease.

-- 
 We, as individuals with high moral character, would prefer not to
 meet a person who still can't sort out his relationship with his
 secretary. In the traditions of Russian society, in such
 situtations, one divorces one's old wife and marries the secretary.
     - extreme Communist Vladimir Zhirinovsky, objecting before the
       Russian Parliament to President Clinton's visit