BoxSearch5 pre2 test version released

39 views
Skip to first unread message

not...@vip.sina.com

unread,
Mar 14, 2006, 8:33:41 AM3/14/06
to BoxSearch
http://notabdc.vip.sina.com/Soft/BoxSearch5_pre2_test.exe

new solvable level sample (softstar 59):
###### #####
##@# ### ##
# $ # $ #
# $ # $ #
### ###### #
### ## ##$###
# $ #### ..#
# $ $ $ ...#
# ####...#
# $$ # #...#
# ### #####
####

some UI improvement.

minglw

unread,
Mar 15, 2006, 7:36:09 AM3/15/06
to BoxS...@googlegroups.com
To Ge Yong,

In case you didn't get my e-mail,
here's the result of pre2 with debug.

Thanks!

-- Ming

DebugLog.txt

not...@vip.sina.com

unread,
Mar 15, 2006, 9:04:34 AM3/15/06
to BoxSearch
Now I know the reason. There's an out-of-memory error. If this
occurs in normal solver mode, A message "Out of memory. Please save and
then restart the program." is shown. This situation is not correctly
handled in optimizer mode, so the bug occurs.
In this situation, BoxSearch can't get more memory from windows
system. This error can be detected but the program can not recover
from this error. I will fix this bug by give error message suggesting
the user to save&quit. (I'm not sure whether the current result of
optimizing can be rescued, I need you to test again.)

yin sun

unread,
Mar 15, 2006, 11:29:13 AM3/15/06
to BoxS...@googlegroups.com
seems the cancel button in the solving mode is not effective, I have
to end up killing the program. Do you see the same behavior?

Thanks,
/Yin


--
http://spaces.msn.com/sunyin

minglw

unread,
Mar 15, 2006, 1:37:52 PM3/15/06
to BoxS...@googlegroups.com
The cancel button works fine for me in both the solving mode &
optimization mode.

minglw

unread,
Mar 15, 2006, 1:47:40 PM3/15/06
to BoxS...@googlegroups.com
> Now I know the reason. There's an out-of-memory error. If this

That's good to know. At least we know the problem now. :-)

> occurs in normal solver mode, A message "Out of memory. Please save and
> then restart the program." is shown. This situation is not correctly
> handled in optimizer mode, so the bug occurs.

I wanted to ask you this question for times already but forgot about it:
When running in solver mode and you get the message


"Out of memory. Please save and then restart the program."

How do you save and do you restart ? Does restart allow you to
continue where you've left ?


> In this situation, BoxSearch can't get more memory from windows
> system. This error can be detected but the program can not recover
> from this error. I will fix this bug by give error message suggesting
> the user to save&quit. (I'm not sure whether the current result of
> optimizing can be rescued, I need you to test again.)

To me the unlimit memory (setting it to 0) option is somewhat useless....
If I have X amount of memory and boxsearch can't finish the job and in
the end it will give me an "out of memory" memory, what good is it to
allow a number that's larger than what's available in the system ?

I remember that when I limit the memory to 1.9G, I didn't get this
error and boxsearch returns a valid solution. So, my question to you
is: can boxsearch automatically determine how much memory is in the
system use that as the limit ?

Thanks!

not...@vip.sina.com

unread,
Mar 16, 2006, 6:04:52 AM3/16/06
to BoxSearch
BoxSearch check the "cancel button" when it update message text in
the progress dialogue. If message text is not updated frequently,
(maybe your CPU is slow, or many virtual memory is used, or the solver
is busy doing a complex checking), the cancel button will seem to be no
use for a while. Just wait, or use "ESC" key instead.

yin sun 写道:

not...@vip.sina.com

unread,
Mar 16, 2006, 6:36:02 AM3/16/06
to BoxSearch
"Out of memory. Please save and then restart the program."
This sentence seems to be unclear. The solving progress is lost and
can't be saved, and internal state of the solver is damaged. So the
only thing the user can do is to save the level and quit. Can you
suggest a better sentence?

To dectect the memory status in precision is impossible, because the
system memory is dynamically shared by all programs in windows.
However, I can detect "low memory" instead of "no memory". but this
causes some "usable memory waste". How do you think about it?

minglw

unread,
Mar 16, 2006, 9:36:55 AM3/16/06
to BoxS...@googlegroups.com
> "Out of memory. Please save and then restart the program."
> This sentence seems to be unclear. The solving progress is lost and
> can't be saved, and internal state of the solver is damaged. So the
> only thing the user can do is to save the level and quit. Can you
> suggest a better sentence?

I think the "save" part is confusing. It's better to just say "Out of
memory, can't proceed with solving." Or just as simple as "Out of
memory" -- it's clear enough on what the problem.
There's no need to mention the "save" part because I believe boxsearch
will prompt the user if there's something needs to be saved if the
user tries to exit.

> To dectect the memory status in precision is impossible, because the
> system memory is dynamically shared by all programs in windows.
> However, I can detect "low memory" instead of "no memory". but this
> causes some "usable memory waste". How do you think about it?

I was trying to suggest: If boxsearch can detect the MAX memory the
user has, why not set the "memory limit" to be that number instead of
0 (unlimited) ?

I understand, the actual available memory can change because the
memory is shared with all running programs. But that memory can be
freed too -- it's probably in the user's best interest to close all
programs before running boxsearch. I was simply suggesting for a
default value for the "memory limit" field.

Now I have a question. I remembered that when I set the limit to
1.9G, it returns a valid answer. And we know that if I don't set a
memory limit, it returns an invalid answer (due to out of memory).

How does memory limitation works ?
Is it that when you detected memory is above the set-value, you simply
end the optimization ?
I did notice that memory allocation seems to be different between 1.9G
& 0 (unlimited). When running with 1.9G memory limitation, boxsearch
seems to increase the memory usage much slower versus it's much
quicker with unlimited memory.

I have a suggestion: In the case that optimizer is running out of
memory, acknowledge the user of the problem and also return the best
solution that it obtained so far (as if the user hit the cancel
button during optimization).

Thanks!

not...@gmail.com

unread,
Mar 18, 2006, 1:32:11 AM3/18/06
to BoxSearch
> I was trying to suggest: If boxsearch can detect the MAX memory the
> user has, why not set the "memory limit" to be that number instead of
> 0 (unlimited) ?

Because "MAX memory" is not the same as "Usable memory". "Usable
memory" contains following parts:
1. free phisical memory.
2. free virtual memory (phisically page file on disk).
3. potential enlarged virtual memory.
(1) & (2) is dynamically changed every seconds;
(3) is determined by system settings & free disk space at the moment
when windows decide to enlarge page file size.
It's like a bank: there is a large number on the account, but it's
impossible to change all of it into cash in most cases.

> Now I have a question. I remembered that when I set the limit to
> 1.9G, it returns a valid answer. And we know that if I don't set a
> memory limit, it returns an invalid answer (due to out of memory).
>
> How does memory limitation works ?
> Is it that when you detected memory is above the set-value, you simply
> end the optimization ?

Yes.

> I did notice that memory allocation seems to be different between 1.9G
> & 0 (unlimited). When running with 1.9G memory limitation, boxsearch
> seems to increase the memory usage much slower versus it's much
> quicker with unlimited memory.

I guess you only watch physical memory usage. If you also watch virtual
memory usage, you will find there is no diffirence. Try "view-select
column" menu of task manager.

>
> I have a suggestion: In the case that optimizer is running out of
> memory, acknowledge the user of the problem and also return the best
> solution that it obtained so far (as if the user hit the cancel
> button during optimization).
>

I will think about it.

And more, I have to say, in 32bit windows, total usable memory of a
single program is no more than 2G. So set limitation to 2047M is
enough. There's some method can enlarge the limitation to about 4G, but
it's too complex for the structure of BoxSearch. I'm waiting for the
coming 64bit new age.

yin sun

unread,
Mar 20, 2006, 3:46:48 PM3/20/06
to BoxS...@googlegroups.com
Hi GeYong,

With the current limitation of CPU and memory and time, do you have a
list about which level is auto-solved which is not.


--
http://spaces.msn.com/sunyin

not...@gmail.com

unread,
Mar 21, 2006, 9:41:43 AM3/21/06
to BoxSearch
I think every small level and many medium levels can be solved. Usually
I use 306 level set from softstar to do test.
My PC at home has only 256M memory, So I hadn't do the test you said.
If there is someone can do some test, I'm glad to give program support.

Buy the way, is there "Solver program interface standard" on the world
? It will be very useful for integrating solver into popular sokoban
games.

yin sun

unread,
Mar 21, 2006, 11:54:25 AM3/21/06
to BoxS...@googlegroups.com
the Common Sokoban Solver Plugin Interface proposed by sokoban++
http://www.joriswit.nl/sokoban/

open source Sokoban YASC also supports it

I am not sure how popular they are. But the google result is pretty top.

/Yin


--
http://spaces.msn.com/sunyin

minglw

unread,
Mar 21, 2006, 12:11:22 PM3/21/06
to BoxS...@googlegroups.com
GeYong,

> Buy the way, is there "Solver program interface standard" on the world
> ? It will be very useful for integrating solver into popular sokoban
> games.

Not sure if there really is a standard. I know SokoYASC allows solver plugins.
The author, Brian, also wrote a sokoban solver (YASS) as well.
You can read more info from the site:
https://sourceforge.net/projects/sokobanyasc/
The source codes for both SokoYASC and YASS are also available.
(There's even a sokoban level generator.)

If you can't find the info on the homepage, you can contact the author
for more info on the interface

I prefer to run BoxSearch as a stand-alone app. However, I think it's
nice to have a boxsearch plugin for SokoYASC.

Reply all
Reply to author
Forward
0 new messages