Chess Problems Forum Index Chess Problems
Chess Problems
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Heavy CPU usage - AI continues after clicking "Restart&

 
Post new topic   Reply to topic    Chess Problems Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
billygotee
Beginner


Joined: 14 Sep 2007
Posts: 5

PostPosted: Sun Sep 16, 2007 4:12 pm    Post subject: Heavy CPU usage - AI continues after clicking "Restart& Reply with quote

Hi,

Around 1 to 2 minutes after the applet loads in Firefox, "auto-play" mode and regular "play" mode becomes noticeably jerky. When I look in Task Manager, firefox is taking up all of the CPU, and when I close the tab with the ChessProblems applet, the CPU goes back to normal. I haven't been able to figure out if there's anything I'm doing to trigger this, but I've had it happen on two different computers.

I'm posting this in case no one already knows. . .didn't see anything about it after a quick search in the forums. If you need more information I'd be happy to see if theres a way to reproduce it.

-Brandon


Last edited by billygotee on Sun Sep 16, 2007 7:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
billygotee
Beginner


Joined: 14 Sep 2007
Posts: 5

PostPosted: Sun Sep 16, 2007 4:36 pm    Post subject: Reply with quote

Update: It happens in Internet Explorer too. It's because of the AI, even though the move was cancelled by clicking "Restart". So the AI thread needs to have a stop event in case user clicks "Restart".
Back to top
View user's profile Send private message
mrmip
Administrator


Joined: 05 Nov 2005
Posts: 230
Location: Finland

PostPosted: Mon Sep 17, 2007 7:56 am    Post subject: Reply with quote

I've noticed this. But it only happens in longer (>=3) problems, when user has given a 'wrong' move and Caissa has to work out a refutation. This may take a lot of time and it seems that restart does not interrupt Caissa's thinking, though the pieces assume the initial position. Indeed I recall that sometimes Caissa suddenly plays the refutation move - while we are in the middle of a new variation. Smile

The way to avoid this and other time-consuming operations is to just write longer mates (>3) in the green heading field and not as a number in 'Mate in'-box. Then upon faulty choice by the user Caissa will just inform 'Off path' and will not begin to search for a refutation.
_________________
There are only three kinds of chessplayers - those who can count and those who cannot....
Back to top
View user's profile Send private message Send e-mail Visit poster's website
billygotee
Beginner


Joined: 14 Sep 2007
Posts: 5

PostPosted: Mon Sep 17, 2007 1:24 pm    Post subject: Reply with quote

Hmmm. . .yeah I've seen some problems that were made in this way that said "Off path." But not everyone seems to be doing this. . .at any rate I can't, as a user, change this (I think?). And considering the AI is already being done in a separate thread anyway (as you mentioned, it does its calculations AND makes the move whether the board was reset or not) this is an easy fix for the java applet developer -- check for a stop signal inside of any AI loop iteration.

This is a very nice service by the way (whoever Smile ).
Back to top
View user's profile Send private message
mrmip
Administrator


Joined: 05 Nov 2005
Posts: 230
Location: Finland

PostPosted: Tue Sep 18, 2007 9:46 am    Post subject: Reply with quote

You are absolutely right. It is not the solver's responsibility (nor can he do anything about it) to overcome this difficulty. It is a responsible submitter, who needs to set puzzles as (technically) easy and comfortable to a solver as possible.

Alternatively and preferrably this bug (a thread running after restart) should be corrected. Adum are you reading this? The man says it is easy...
_________________
There are only three kinds of chessplayers - those who can count and those who cannot....
Back to top
View user's profile Send private message Send e-mail Visit poster's website
billygotee
Beginner


Joined: 14 Sep 2007
Posts: 5

PostPosted: Tue Sep 18, 2007 5:28 pm    Post subject: Reply with quote

mrmip wrote:
The man says it is easy...


Sad I hope, but maybe not if Adum is using a separate library to do all of the AI calculations. Only solution then is to either let the user cancel AI calculations, let the user disable AI calculations in the user profile, or just disable AI altogether. I made a suggestion concerning this in the suggestions section.

Well, I'm off to solve some chess problems. Smile

-Brandon
Back to top
View user's profile Send private message
adum
Site Admin


Joined: 05 Jun 2005
Posts: 128

PostPosted: Wed Sep 26, 2007 3:48 pm    Post subject: Reply with quote

the cancel button is _supposed_ to kill the AI thread. i need to look into this...

adum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Chess Problems Forum Index -> Bugs All times are GMT - 9 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group