From: Contest_Guy <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Code fails for performing pops
Message-ID: <ef2fb57.90@webx.raydaftYaTP>
Date: Tue, 11 Apr 2006 23:15:00 -0400
References: <ef2fb57.3@webx.raydaftYaTP> <ef2fb57.4@webx.raydaftYaTP> <ef2fb57.5@webx.raydaftYaTP> <ef2fb57.88@webx.raydaftYaTP> <ef2fb57.89@webx.raydaftYaTP>
Lines: 67
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: comp.soft-sys.matlab:344343

I set the code in 'runcontest' to only examine the 1st board in the
test suite; in other words I set the "for" loops for both

(1) '% Run the submission for each problem in the suite.'
(2) '% Grade all answers.'


'for i=1:1'

Again, I have checked the data of the first matrix, namely that of
'testsuite(1).boards' and found that a pop was indeed valid with the

'moves = [1 1 0]'

And, if the move is valid, the updated score seems to be wrong; i
checked the sum of the first matrix and it summed to be 1343. With a
pop in the indicated position, there are two other blocks in the
south direction with a value of '3'. There are three '3's total with
a pop score of nine. A pop in this location should then result in a
score of 1343 - (3*3) = 1334. However, the score indicated is 1343.

Also, just to clarify, I am assuming both kinds of moves (pops &
swaps) can be done anywhere on the board and not just on the bottom
most line (the last row of the matrix).

Lucio wrote:
> Hi Contest_Guy
> runcontest will try to grade all the boards in the testsuite, most
> likely you are getting this warning in other thanthe first board.
> Lucio
> Contest_Guy wrote:
>> I am just doing some preliminary test from the .zip files I
>> downloaded and I am looking at the first board from the
> testsuite.
>> I
>> use for moves in the solver
>> 'moves[1 1 0]'
>> and I get the following error when I run 'runcontest':
>> 'Warning: You cannot pop single blocks.
>>> In C:\MATLAB6p5\work\Matcon13\blockbuster\grade.m at line
>> In C:\MATLAB6p5\work\Matcon13\blockbuster\runcontest.m at line
>> 42'
>> It should not say that I cannot pop single blocks as I checked
> the
>> data for the first board. There is a '3' in position (1,1)
> followed
>> by a '3' in position (2,1) and according to the rules I am
> allowed
>> to
>> pop two or more contiguous blocks in a N-E-W-S direction. Can
>> please tell me what's going on?