Handling level command 0 5 0

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Handling level command 0 5 0

Postby peterhughes » 09 Apr 2005, 21:36

level 0 5 0

As far as I understand it, this command is interpretted as:

Play all moves in 5 mintes, with no extra time increment per move.

1) Since you have no idea how many moves it will take to win, how do you decide how much time to allocate to each move?

2) What happens when the 5 mintues run out?
peterhughes
 
Posts: 42
Joined: 18 Jan 2005, 23:37

Re: Handling level command 0 5 0

Postby Pallav Nawani » 09 Apr 2005, 22:17

Hello,

1. Every time I have to make a move, I assume that there are 30 moves left. So I allocate time like this:
time_for_this_move = time_left/30;

2. When time runs out, the engine loses the game.

Pallav
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: Handling level command 0 5 0

Postby Volker Annuss » 09 Apr 2005, 22:32

Hello Peter,

the problem is the same that a human player has with that level.

1.) Allocate on average 1/30 of the remaining time for the next move. Of course, you can do much more to get a better timing. For an example look at the arena news ticker from March 23 for an article about timing with neural networks.

2.) The game is lost on time. This is something that happens in levels with sudden death.

Greetings,
Volker

Edit: Pallav, you were faster :wink:
Volker Annuss
 
Posts: 49
Joined: 25 Jan 2005, 11:14

Re: Handling level command 0 5 0

Postby peterhughes » 09 Apr 2005, 23:10

Right, cheers. I'll do the time/30 thing also.

So... I now have 4 different time modes that I'm supporting:

1) st x: Fixed "x" time per move.

2) level m t 0: A repeating time period of "m" moves in "t" minutes. Here I use time_remaining / ("m" - number_of_moves_made). Once "m" moves has passed, I add an extra "m" moves and "t" time on again.

3) level 0 t i: Here, I calculate "i" time per move, plus "t" base time added on and spread equally over the first 40 moves.

4) level 0 t 0: Finally, fixed game time. I'm now using the "time_remaining / 30" method that you suggested.

Would you say that pretty much covers it?
peterhughes
 
Posts: 42
Joined: 18 Jan 2005, 23:37

Re: Handling level command 0 5 0

Postby Volker Annuss » 10 Apr 2005, 10:49

Hello Peter,

that should work, but imagine level 0 t i with a large t and a small i. For such cases it would be better to use the base time as in 0 t 0.

Greetings,
Volker
Volker Annuss
 
Posts: 49
Joined: 25 Jan 2005, 11:14


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 22 guests