Skip to content

zx030af6.com.....

5 messages · 2003-11-06 → 2003-11-23 · Yahoo Group era · View archive on archive.org

Participants: Stephen Wenzler, Alvin, Jarek Adamski

Preserved from the Timex/Sinclair 2068 Yahoo Group (2001–2019), which is no longer online. Text reproduced from the archive.org archive; email addresses masked.

Messages

1. zx030af6.com.....

Stephen Wenzler · Thu, 06 Nov 2003 18:23

Hi again, just wanted to let you know that I looked at af6.txt and what 
I learned that it points to several websites but no such info on this 
small .COM program but it did lists several .ZIP files but I can't seems 
to find the info I need to know. Any pointers???

Thanks!

-- 
WWW: http://www.boomspeed.com/stephenw4
EMAIL: [email]
AIM: S Wenzler
ICQ: 124608891
MSIM: stephenw4

**for sale**
I have a bunch of items for sale on eBay, click this link below:
http://cgi6.ebay.com/aw-cgi/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=stephenw1&include=0&since=-1&sort=2&rows=25

**UPDATE**

** A REMINDER - PLEASE SCAN YOUR SYSTEMS / NETWORKS REGULARLY WITH    **
** LATEST ANTIVIRUS SOFTWARE TO PROTECT NOT ONLY YOURSELF BUT OTHERS  **
** TOO FROM VIRUSES, TROJIANS, AND WORMS                              **
**                                                                    **
** THANK YOU                                                          **

2. Re: [ts2068] zx030af6.com.....

Alvin · Fri, 07 Nov 2003 16:27

Stephen Wenzler wrote:
> 
> Hi again, just wanted to let you know that I looked at af6.txt and what
> I learned that it points to several websites but no such info on this
> small .COM program but it did lists several .ZIP files but I can't seems
> to find the info I need to know. Any pointers???

CPM22QED and ZXVGS are Jarek's projects:

http://nautilus.torch.net.pl/~yarek/zxvgs/download.html

The specific zip files mentioned in the text file would be FD68
versions of CPM22QED and ZXVGS but he does mention they are
not finished yet and they don't yet appear on the above
downloads page.  Does anyone have the original CP/M 2.2 as
provided by AERCO?  Might be worthwhile to archive that too.

Alvin

3. Minesweeper AI

Alvin · Fri, 07 Nov 2003 18:01

I thought I'd share one of the ts2068 projects that have
interested me over the last week.  I know I said I'd have
this done by, oh, last weekend, but no one pays me to
do these things so I can only get things done when I
have spare time :-)

The problem is to get the computer to play a good game
of Minesweeper without cheating!  Ie- base decisions
solely on what is revealed on the board and not what
is still hidden.

I went through several ideas: a probabilistic model
that was way too complicated, a method based on 
solving simultaneous equations and the method I chose
based on boolean algebra.

The method based on simultaneous equations would have
worked as follows:

Each square either contains a bomb (1) or not (0). For
each square revealed that does not contain a bomb,
the square's number indicates how many squares surrounding
it contains a bomb:

ABC
DEF
GHI

Imagine square E is revealed.  It contains a number 'mE'
that indicates the number of bombs around it.  Then:

A+B+C+D+F+G+H+I = mE

where A..I = 0 if it is known no bomb is there
           = 1 if it is known a bomb is there
           otherwise remains as a variable

For each revealed square, you'll get a bunch of these
equations that must be consistent.  With enough equations
(and the right ones), revealed as the computer uncovers
minesweeper squares, the math would indicate which yet
uncovered squares contained bombs and which didn't.

The equations could be maintained in reduced row echelon
form as they are added, one at a time, to the existing
set using Gaussain elimination.

Problem:  A..I can take on any value in such an equation,
but our problem demands that A..I be either zero or one.
Because of this, equations would have to be looked at
individually to determine if there is only one assignment
of 0s and 1s to make it consistent.  Answers would't always
just fall out of the sky from straightforward Gaussian
eliminations, which assume A..I can take on any value.

Since the variables A..I can only take on values of 0 or
1, the next logical step seemed to be to try boolean algebra
to describe a minesweeper game.

Once again, consider a portion of the board:

ABC
DEF
GHI

With E revealing it's not a bomb and containing a number 'mE'
indicating how many bombs surround it.

For the following boolean equations, I've decided 'true' means
the square is a bomb and 'false' means it's not.  Each boolean
equation describes one possibility for bombs around some
square (eg, square E above).  All possibilities must be
described and it is known exactly one will in fact be
the truth.

With 0<=mE<=8, and supposing that 'b' of the surrounding
squares are known to be bombs and 'e' of the surrounding
squares are known not to be bombs.

Then when square E is revealed:

(8-b-e)!/((8-e-mE)!(mE-b)!)

different boolean equations can be written describing all
possible bomb layouts around square E.

Eg:  if a '2' is revealed, with none of the surrounding
squares known, then there are 8!/(6!2!) = 28 possible
bomb layouts around square E, and here they are:

ABcdfghi
AbCdfghi
AbcDfghi
AbcdFghi
AbcdfGhi
AbcdfgHi
AbcdfghI
aBCdfghi
aBcDfghi
aBcdFghi
aBcdfGhi
aBcdfgHi
aBcdfghI
abCDfghi
abCdFghi
abCdfGhi
abCdfgHi
abCdfghI
abcDFghi
abcDfGhi
abcDfgHi
abcDfghI
abcdFGhi
abcdFgHi
abcdFghI
abcdfGHi
abcdfGhI
abcdfgHI

where an upper case letter indicates the presence of a bomb
and a lower case letter indicates no bomb.  Each of these
possibilities can be represented by a boolean equation
which can then be ORed together, with us knowing that exactly
one will be true.

Eg, taking just the first and last equations above:

A*B*/C*/D*/F*/G*/H*/I +
/A*/B*/C*/D*/F*/G*H*I

with '*' = logical AND, '/' = NOT, '+' = logical OR

When another square is revealed, we get another boolean
equation with a bunch of ORed terms representing all
possible bomb locations surrounding that revealed
square.  This must be consistent with the first
equation so we can AND the two together to represent
all known bomb layouts thus far.  This logical ANDing
of two bomb layout equations may eliminate some
inconsistent layouts and may reveal some squares
must contain a bomb or not (they must be true or false
for the overall equation to be true, which we know must
be true).

Here's an example:

(top edge)
A 2 0
B 3 C
D 0 0

where A..D are yet uncovered squares.

Around the '2' in the board, we have boolean equation:
AB/C + A/BC + /ABC

Around the '3':
ABC/D + A/BCD + AB/CD + /ABCD

They both must be true so AND them together:

  (AB/C + A/BC + /ABC)(ABC/D + A/BCD + AB/CD + /ABCD)
= AB/CD + A/BCD + /ABCD

Exactly one of these terms is true.  Notice a common
factor, D, must be true in order for the overall
equation to be true:

= D(AB/C + A/BC + /ABC)

This means D is a bomb and we can mark it as so.  This
at least isn't obvious to me, but the math doesn't
lie :-)

Anyway, that's the gist.  Boolean expressions can be
operated on efficiently (memory and speed-wise)
using BDDs (binary decision diagrams).  I'll be
implementing ROBDDs (reduced order BDDs), which has
a chance to be the first time that's ever been done
on an 8-bit machine, seeing as BDDs were first
discussed in 88/89.

If a move is not obvious (indicated by common factors
coming out of the overall boolean equation), it is
still possible to use the boolean equation to determine
the probability that a square will contain a bomb so
that the computer can make the safest possible move.

If anyone can improve on this, let me know.

Alvin

4. Re: [ts2068] zx030af6.com.....

Stephen Wenzler · Sun, 09 Nov 2003 19:45

hey folks, I have a copy of RP/M operaring system and I did tried it and 
WORKS nicely so if you need this, let me know so I can put up the .DSK 
image of the orignal RP/M operating system -- when I boot with the 
software from  the files supplied with FD68 archive and it works like a 
charm and I can see the greeting message and got to the familar CP/M 
prompt. Let me know so I can put it up on the files area of this group 
so you can reltieve them.

Thanks!


Alvin wrote:

> Stephen Wenzler wrote:
> >
> > Hi again, just wanted to let you know that I looked at af6.txt and what
> > I learned that it points to several websites but no such info on this
> > small .COM program but it did lists several .ZIP files but I can't seems
> > to find the info I need to know. Any pointers???
>
> CPM22QED and ZXVGS are Jarek's projects:
>
> http://nautilus.torch.net.pl/~yarek/zxvgs/download.html 
> <http://nautilus.torch.net.pl/%7Eyarek/zxvgs/download.html>
>
> The specific zip files mentioned in the text file would be FD68
> versions of CPM22QED and ZXVGS but he does mention they are
> not finished yet and they don't yet appear on the above
> downloads page.  Does anyone have the original CP/M 2.2 as
> provided by AERCO?  Might be worthwhile to archive that too.
>
> Alvin
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> <http://rd.yahoo.com/M&7637.4116732.5333197.1261774/D=egroupweb/S05566162:HM/A53618/R=0/SIGtco8nod/*http://www.netflix.com/Default?mqso`178338&partidA16732> 
>
>
>
> To unsubscribe from this group, send an email to:
> [email]
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
> <http://docs.yahoo.com/info/terms/>.


-- 
WWW: http://www.boomspeed.com/stephenw4
EMAIL: [email]
AIM: S Wenzler
ICQ: 124608891
MSIM: stephenw4

**for sale**
I have a bunch of items for sale on eBay, click this link below:
http://cgi6.ebay.com/aw-cgi/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=stephenw1&include=0&since=-1&sort=2&rows%

**UPDATE**

** A REMINDER - PLEASE SCAN YOUR SYSTEMS / NETWORKS REGULARLY WITH    **
** LATEST ANTIVIRUS SOFTWARE TO PROTECT NOT ONLY YOURSELF BUT OTHERS  **
** TOO FROM VIRUSES, TROJIANS, AND WORMS                              **
**                                                                    **
** THANK YOU                                                          **

5. Re: Minesweeper AI

Jarek Adamski · Sun, 23 Nov 2003 15:57

--- In [email], Alvin <aralbrec@i...> wrote:

> I went through several ideas: a probabilistic model
> that was way too complicated, a method based on 
> solving simultaneous equations and the method I chose
> based on boolean algebra.

Well, recently I teached my girl to play Mineswepper...

I invented an alghoritm with 4 possible action:

1. Random shot. Useful for start and when nothing else
can be done.

2. Finding edge. When there is a 9 fields square with one
field hidden, the number in the middle tells if there's
another mine or not.

 ABC
 DEF
 GHJ

So hidden can be only one among ABCDFGHJ and the E must be
a number range 0..8 (not mine).

3. Finding completes - 9 fields square, where the sum of
hidden fields and fields mareked as mines is equal to E.
This tells that all hidden field have mines or all are
mines free. This can create the edges. (This is in fact
advanced version of edge analyse, but finding edges is
easier when humans plays.)

4. When no edges and completes - advanced analyse is needed.
The loop assumes a mine is every pleace of hidden area.
Then next mines are setted to fill the needs of
known fields. If the calculation fails - the start field is
free. When the calculation gives several possiblilities
of next mine setting - procedure is executed recursively.
The second step is a loop that assumes theres no mine in
a field. When both ways fail - random shut must be
performed.

Yarek.

Indexed under

ZX Spectrum · Games