Tilbage til Skak


This dokument tells everything about Brutalis.

Brutalis is designed for helpmates.
So first I present 7 examples of helpmates.
(they are all included in Brutalis)

This is a helpmate in 2 moves (= H#2) with 2 solutions.
(black usually moves first in helpmates)

Kg2 Ne3+,Kxh1 0-0-0#
Bxa1 Nc3,Bb2 0-0#

White uses the two castlings to mate!

Brutalis solves this in 2.36 seconds on my 2.6 GHz PC.


H#2 with 2 solutions.

Kg4 Kf2,Kh3 Be6#
Kg2 Be6,Kf1 Bh3#

Brutalis solves this in 0.01 second on my 2.6 GHz PC.


H#2 with 2 solutions.

Qf3+ Nf5+,Ke4+ Nb2#
Qd6# Ne6+,Kd5+ Ne5#

All the 8 moves are checks!

Brutalis solves this in 2.64 seconds on my 2.6 GHz PC.


H#2 with 2 solutions.

f6 Nf8,Rf7 Ng6#
Rg8 Nf6,Rf8 Nd5#

Brutalis solves this in 0.17 second on my 2.6 GHz PC.


H#6 with 3 solutions.

One solution is Qa8 c3,Kc5 c4,Kb6 c5+,Ka7 c6,Rb7 c7,Ba6 c8N#

I don't remember the other solutions.

Brutalis have tried this task on lower depths.
Although it searches 195.000 positions pr. second on my 2.6 GHz PC,
it seems to need about 200 hours to solve this task!.


H#3 with 2 solutions.

d1R d7,Rd6 d8N,Rg6 Nf7#
d1B d7,Bc2 d8Q,Bcg6 Qd2#

All four kind of promotions are used in the solutions!

Brutalis solves this in 0.17 second on my 2.6 GHz PC.


H#2 with 1 solution.
NB: The knights (except e5) are nightriders!

Nc7-f1 Ne6-a8,Ng7-d1 Ne5-d3#

Brutalis solves this in 0.17 second on my 2.6 GHz PC.


B R U T A L I S - 1.0 ---------- Jens Bęk Nielsen


This program solves (and helps composing) helpmates and constructed tasks.

It can use normal knights and nightriders.
(A nightrider on g1 can fx. move to f3, e5, d7.)
But you cannot mix knights and knightriders.
Another special option is to choose english/danish(=german,sweedish) notation.

Use function 2 to set the depth.
Black normally starts in helpmates. A helpmate in 2 moves (H#2) has moves
by black, white, black and white mating black.
Set the depth to 4 for such a H#2.
BRUTALIS goes a halfmove deeper internally to see if there is a mate.
Maximum depth is 32.
See more about the iterative search later.


Don't care about upper-/lowercase. BRUTALIS handles this.
I have not bothered to make a nice typing of men, so when you have the
option to type in "2,3,4,5,6,7" it simply means P,N,B,R,Q,K.
You can use "s" and "S" for rooks that cannot castle (type in position).

My main interest is constructed tasks from the initial position.
Fx "a game started e2-e4. A knight captured a rook in move 5 with mate. how?".
Solution: 1.e4,Nf6 2.Qe2,Nxe4 3.f3,Ng3 4.Qxe7+,Qxe7+ 5.Kf2,Nxh1#
Another: "A game ended with 6.gxf8N#". how?".
Solution: 1.h4,d5 2.h5,Nd7 3.h6,Ndf6 4.hxg7,Kd7 5.Rh6,Ne8 6.gxf8N#

I have made some special features to speed up the program.
If you know a piece makes many moves you can tell the program this.
You can chose a piece for both black and white if you want, and you can
also tell how many moves by other pieces is allowed.

Another feature is that you can demand something about the mating position.
You can choose any square and tell what content it should have (empty or a
certain black or white piece).
With these features I have tried to find mates with the white king on row
number 4 and where black mates in move 4.
Among these mates I have found these:
"The white king is mated on g4 in move 4, and black has made two bishopmoves.
"The white king is mated on f4 in move 4, and a capture occured in the game.
"The white king is mated on h4 in move 4 in a game where black opened 1.-,e6.

If you can't solve these, BRUTALIS can.
Demand (function 7) the white king to be on f4/g4/h4, and use function 9 to
tell that many moves should be made with the piece on e1 - the white king.
Remember to allow 1 move by another piece - white must move a pawn to let
the king come out.
Set the depth to 8 and start the search. It will take a little more than
half an hour. All timings in this documentation and in the menues applies
to my 486 dx 50 Mhz (my current 2.6 GHz PC is 80 times faster).
I have tried to only allow g1(the mating side) and g8 to move, and then all
the mates in move 6 (use depth 11) will occur in an hour as far as I remember.
White captures d8/f8, black moves to d8/f8, white mates on c7/g7.
This shows how deep you can go with these features.

I have also made some other things you can demand on the mating position.
You can demand a certain kind of man to make the mating move (function 5).
Please notice that this does not have to be the man that checks the king if
the check is a discovered check. You cannot demand a certain kind of man to
check and mate.

You can also demand something about the square the mating move goes to. Must
it be empty or a certain kind of man (function 6).

I had hoped that the program with the above features could find the shortest
mate in all combinations where (a certain kind of man makes the mating move)
and (moves to a square with a certain content).
For this purpose I have made an iterative search. That is, it first searches
for a mate in n moves, then in n+1 moves etc.
Try to search for the fools mate (fx 1.g4,e6 2.f3,Qh4) with function 2.
Search from mate in 1 move to a mate in 8 moves.
When the program finds a mate in iteration 4, it cancels further iterations.
In iteration 1 BRUTALIS searches for white to mate in 1 move, in iteration 2
for black to mate in 2 (half)moves etc.
If you want to find the shortest white mate, you should choose both the
first and last iteration as odd, so the difference is an even number.
In this case the program ask if you will go to next iteration with +1 (this
means altering white and black mates) or +2 (only mates by one side - in our
case white if you start with an odd iteration).
So iteration from 1 to iteration 9 with a step +2 finds the shortest white
You can use the iterative search to find shorter solutions than the intended
solutions in helpmateproblems.
Please notice that the special functions 'change side' if you use a step that
is +1. If you for the fools mate demand that the black queen is on h4, the
next iteration will demand a white queen on h5!
The initial position (or any other position) is mirrored this way.
BRUTALIS has a hidden function 't' that makes this turn manually. Try to set
some demands in function 7, 8 and 9 and use the turning.
Be aware that function 7, 8 and 9 fits with the FIRST iteration you have
chosen - function 5 and 6 turns automatically.

BRUTALIS displays the move it searches right now.
It also displays a line when it goes to the next iteration.
When a solution is found, nothing but solutions are displayed.
For every 10 solutions the program pauses so you won't miss any solution.

Almost nothing you type in is checked in any way.
So any error may crash the program (I have never tried; though).

In 1995 I started making the chessprogram Dabbaba.
When it was 2 months old I took a copy of it and made BRUTALIS.

Dabbaba has some knowledge to make better ordering of moves.
This is unimportant for BRUTALIS and slows it a bit.
But it is also incorporated in the movegeneration, so I have not bothered
to remove it (may increase the speed by 40%).
Identifying identical positions may make the program 2-3 times faster, BUT:
Every extra halfmove search with fx 32 moves in a position takes 32 times
This means that 2 extra halfmoves takes 1000 times longer.
Even with a computer that is 1.000.000 times faster you can only search
4 extra halfmoves...
So small improvements don't help very much...

The timer overflows when the programs solves long tasks.
The castle-move is always considered as a kingmove, so if you want many
moves with a rook that castles it will disappear for BRUTALIS.

A save, load and edit position would be nice.
I had other ideas about the program, but dropped them when I discovered how
long time a deep search takes.
Typing 2,3,4,5,6,7 instead of p,n,b,r,q,k is silly.
An interesting idea is to make the program selektive so it only searches
promising lines. Then it could search deeper and eventually find (unwanted)
solutions in deeper problems.
You cannot break the programs search.

Most chessprograms use a 'brute-force' search with alpha-beta, but a program
like BRUTALIS cannot use the very timesaving alpha-beta feature because it
must search every single move in all variations.
So BRUTALIS is really brute force.
Besides; a danish ZOO had a rhinoceros named BRUTALIS. It lost its partner
and got more and more angry. It became a problem because it started to
destroy everything.
Taken it's life was considered, but it was decided to bring it back to Africa
even though it was expensive and difficult.
The television followed BRUTALIS and visitid it later. It is happy now as
your BRUTALIS is happy to be on your harddisc.