[Freeciv-Dev] Re: dynamic timeout (PR#1356)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Mar 30, 2002 at 09:25:43PM -0800, Mike Kaufman wrote:
> With help from Per, here is the next go around of the magically
> increasing timer. How it works:
>
> set timeout <timeout>
>
> people should hopefully be familiar with that part. The new part:
>
> timeoutincrease <turn> <turninc> <value> <valuemult>
>
> Description:
> Every <turn> turns, add <value> to timeout timer,
> then add <turninc> to <turn> and multiply <value>
> by <valuemult>.
>
> sound complicated? yes it is, but with about a minute of thought you'll
> see how powerful and flexible it is.
OK, I realise I should have commented on this right away. I did see
it pass by, but I didn't realise it was already in CVS.
The idea is good, but the command line interface to it is broken.
There is an excuse for that, but not good enough to allow it to
pass in its current form, as far as I'm concerned.
I don't think the average user will find out how it works.
I have extensive experience with the command line - it's the
only part of the code I have worked on for a longer time. I noticed
the presence of the new feature when my own patch broke on it.
So I started the server with the explicit purpose to find out how it
works, and I couldn't find it! I had to do another fgrep on the source
code to find out. I looked under the "timeout" option, and it didn't
show any signs of the new feature. There was no other server option to
control timeout, so I gave up.
Let's assume that users brighter than me won't need to fgrep the
source code to find out that it's a a server command, and try
> help tim
Help argument 'tim' is ambiguous.
> help commands
------------------------------------------------------------------------------
The following server commands are available:
------------------------------------------------------------------------------
start help list quit
cut explain show score
wall set rulesetdir rename
metainfo metaconnection metaserver aitoggle
create easy normal hard
cmdlevel firstlevel timeoutincrease endgame
remove save read write
rulesout log rfcstyle freestyle
crash
------------------------------------------------------------------------------
> help timeouti
Command: timeoutincrease - See "help timeoutincrease".
Synopsis: timeoutincrease <turn> <turninc> <value> <valuemult>
Level: ctrl
Description:
Every <turn> turns, add <value> to timeout timer, then add <turninc> to
<turn> and multiply <value> by <valuemult>. Use this command in concert
with the option "timeout". Defaults are 0 0 0 1
They found the help text, but I find this difficult to parse.
> I'm not terribly good at parsing text, so please try it out and try to
> break it.
Brighter users than you and I may figure out how this works,
but they still can't find out what the current value is!
This proves that timeoutincrease ought to be a setting.
It can be multiple server options, or a composite value
for the timeout option, e.g. we can use
> set timeout 40 + 13 * 2 / 30 + 15
for "the timeout is 40 now; after 30, 45, 75, 120, ... turns,
its value is increased by 13 and multiplied by 2". It can
also be /shown in that way. This way it will be an option,
although I'm not sure if the syntax is much better.
But the worst problem is that I don't know how to use this.
The multiplication factor makes it hard. It allows quadratic increase,
which is probably realistic, but which values to use?
I'd much rather say "give me a a 20 second increase after 10 turns,
a 30 second increase after 20 turns, and a 50 second increase after 30
turns", and let civserver work out the multiplication factor for me. E.g.
> set timeout 40, 60@+10, 70@+20, 90@+30
or
> set timeout 40 now, 60 after 10 turns, 70 after 20 turns, 90 after 30 turns
It may even be possible to just have
> set timeout 40 now
and let civserver work out the rest. I'll check some savegames on
civserver.freeciv.org to see if this is the case.
This won't give the user the choice of step size given by your system,
but I really think the user, when given the choice, will always choose
to divide the increase over as many steps as possible.
> -mike
To conclude, the new variables seem very welcome,
but there is room for improvement in the user interface.
If you agree on the approach to use a timeout variable
with expression values, I'll implement it that way.
--
Reinier
- [Freeciv-Dev] Re: dynamic timeout (PR#1356),
Reinier Post <=
|
|