Are you up to the challenge?

12 views
Skip to first unread message

Evangelos Bertakis

unread,
Sep 11, 2007, 10:10:28 AM9/11/07
to fortran thermo math
All work and no play, makes the fortran-thermo-math a dull Google Group.

So here's the CHALLENGE:
*** Write your own program in Fortran for playing backgammon. ***
Then, we will have them compete each other!

Here are the rules:
- Simple backgammon game rules (greek: "portes"). Stones should move
clockwise and exit at the lower left pane of the board.
- Your program is on its own. No human interference is allowed (other
than helping a bit with the I/O).
- If the program crashes it automatically loses the current game.
- One single subroutine interface. It should get the dice roll and the
board state as input and should return the action to be taken as
output. No visualization is necessary, but the I/O should be
intuitive.
- Logging and bookkeeping are allowed, i.e. the program is allowed to
"remember" previous board states and to have an inventory with optimum
strategies. In fact, you are allowed to do anything you want in order
to make your program play better.
- An answer should be given by the program in less than one minute on
a modern PC for every dice roll. If the program answers late or falls
in an infinite loop, it automatically looses the current game.
- Winner is decided after winning 4 out of 7 games.
- 100% open source. Subroutines from external libraries (if any) must
be made available in source form.

Are you up to the challenge?

Vangelis

Dimitrios Papadopoulos

unread,
Sep 17, 2007, 11:09:39 AM9/17/07
to Fortran Thermodynamics Mathematics
Hello,

I'm in, I'm in!!! Just written the I/O (really primitive, but does its
job) and I am writting the main algorithm now. Can I use both cores of
my computer? Haven't done it before and it would be an interesting
challange. In order to win some seconds of CPU time I could switch off
all the graphical interface in my linux box, something that windows
user can't (nanananana) or can you? How many optimization levels are
allowed to the compiler?
Or are we going to run it on the same machine?

How do we count time? With a clock?

This

Evangelos Bertakis

unread,
Sep 17, 2007, 12:20:45 PM9/17/07
to fortran-t...@googlegroups.com
Hi!

Don't worry about the I/O. I've also written something that looks
pretty good also (ASCII-art!). I can post it here when I polish off
some rough edges...

All games will be played on the same machine. The time rule is rather
flexible, I would guess couple of seconds more or something like that
will be tolerated. I imposed this rule to a) avoid infinite loops and
b) prevent really stupid efforts to optimize a dice game with brute
force methods (that are bound to be really slow). Given all these,
then, yes, the time will be just "checked" (I'm not going as far as to
say "kept") with a normal clock.

All methods of optimization that you mentioned are accepted.

Oh, also another rule that came to me (to keep up with the formalities):
If the program suggests an invalid move, it automatically loses the
current game.

Vangelis

Dimitrios Papadopoulos

unread,
Sep 18, 2007, 4:48:15 AM9/18/07
to Fortran Thermodynamics Mathematics
So,

I uploaded the main subroutine, which you can find in the file
section.

You don't have to rewrite it.

Cheers,

Dimitris

Dimitrios Papadopoulos

unread,
Sep 18, 2007, 6:14:51 AM9/18/07
to Fortran Thermodynamics Mathematics
And

I would also suggest that between the games the programmer has 5 mins
break for coffee to modify his code.

Just in case his code had a bug...

Evangelos Bertakis

unread,
Sep 18, 2007, 6:45:08 AM9/18/07
to fortran-t...@googlegroups.com
You dirty rascal...
...you will be the only one to benefit from that rule...

How about giorgos and kostas? If they are sure they won't play, then
this leaves just you and me. In that case, it would also be pointless
to do this through the Google group.

Vangelis

Dimitrios Papadopoulos

unread,
Sep 18, 2007, 8:27:33 AM9/18/07
to Fortran Thermodynamics Mathematics
Why not, its fun!

I practice my english.

Dimitrios Papadopoulos

unread,
Sep 18, 2007, 8:31:04 AM9/18/07
to Fortran Thermodynamics Mathematics
We should also take into account the length of the code somehow.

Just a thought that came to me.

Evangelos Bertakis

unread,
Sep 18, 2007, 8:35:05 AM9/18/07
to fortran-t...@googlegroups.com
Hi!

Dirk just told me he will play as well!

Well, I think the code length is irrelevant. Let's leave this out.

Vangelis

On 9/18/07, Dimitrios Papadopoulos <papadopoulo...@yahoo.gr> wrote:
>

Reply all
Reply to author
Forward
0 new messages