Skip to content →

neverendingbooks Posts

the efficient academic

Can
software help mathematicians to keep up with the neverending (sic) flood
of new research material? In the past I touched this already… Recently, there is a new fairly active Google group
the
efficient academic
which describes its interests as

Professors, Instructors, and Graduate Students
interested in getting things done more easily and quickly. We discuss
organization, task management, and tools that helps us to be more
productive and not procrastinate. We tend to discuss David Allen’s
GTD system but not exclusively. (278 members)

Personally, I think GTD is far too management-driven to be useful in
research, but I’m equally convinced that there are nice programs
around that I have to delve deeper into, in particular DevonThinkPro.
Fortunately, Serkan Cabi has
written two interesting posts on applications of DevonThink to
physics-research :

which can help me a bit. In the second post
appears another useful resource for the average desperate present-day
ringtheorist. Joanna Karczmarek
can help you to put the Hep-th
on Your Harddrive
. A mere 8Gb containing all material published on
hep-th over the years, just waiting to be put in a database-tool like
DevonThink or, if you still need an excuse to buy one, on your iPod to
read on your daily commute…

Leave a Comment

Latexrender and dvonn boards

In order
to blog a bit about Dvonn-strategy, I made myself a simple Dvonn
LaTeX-template which works very well on paper but which gets mutilated
by Latexrender, for example the first situation of the looks
like

$~\xymatrix@=.3cm @!C @R=.7cm{ & & \Black{2} \connS & &
\bull{d}{5} \conn & & \bull{e}{5} \conn & & \bull{f}{5} \conn & &
\bull{g}{5} \conn & & \bull{h}{5} \conn & & \SWhite \connS & & \SWhite
\connS & & \SWhite \conneS & & \\ & \bull{b}{4} \conn & & \SBlack
\connS & & \Black{6} \connS & & \bull{e}{4} \conn& & \bull{f}{4} \conn &
& \bull{g}{4} \conn & & \bull{h}{4} \conn & & \SWhite \connS & &
\SWhite \connS & & \SWhite \conneS & \\ \SBlack \connbeginS & &
\SBlack \connS & & \BDvonn{7} \connS & & \bull{d}{3} \conn & & \SBlack
\connS & & \BDvonn{6} \connS & & \bull{g}{3} \conn & & \bull{h}{3}
\conn & & \Dvonn \connS & & \SWhite \connS & & \SWhite \connendS \\ &
\Black{5} \connbeginS & & \bull{b}{2} \conn & & \SBlack \connS & &
\bull{d}{2} \conn & & \bull{e}{2} \conn & & \bull{f}{2} \conn & &
\bull{g}{2} \conn & & \bull{h}{2} \conn & & \SWhite \connS & & \SWhite
\connendS & \\ & & \bull{a}{1} \con & & \bull{b}{1} \con & & \Black{5}
\conS & & \bull{d}{1} \con & & \bull{e}{1} \con & & \bull{f}{1} \con & &
\bull{g}{1} \con & & \bull{h}{1} \con & & \White{2} & &} $

The
reason behind this unwanted clipping is that Latexrender uses
**convert** to take the relevant part of a ps-page containing only the
TeXed formula on an empty page by performing clipping and then converts
it into a GIF-file (or any other format you desire). The obvious way
round this is to enlarge my template by adding two additional rows and
columns and putting visible nonsense there (such as dots) to enlarge the
relevant part so that no clipping is done of essential info. But then
(1) the picture generated becomes even larger than that above and (2) I
don’t want you to see the extra nonsensical dots… The essential line
in the **class.latexrender.php** file is

$command =
$this->_convert_path." -density ".$this->_formula_density.
" -trim -transparent \"#FFFFFF\" ".$this->_tmp_filename.".ps ".
$this->_tmp_filename.".".$this->_image_format;

So
I needed to delve into the [manual pages for the convert command](http://amath.colorado.edu/computing/software/man/convert.html)
of the ImageMagick-package. To my surprise, the *-trim* option (which I
thought to adjust somewhat by adding parameters) doesn’t exist! Still, I
got around my second problem using the *crop* option and around the
first by using the very useful *geometry* option. The latter is also
useful if you find that the size of the output of Latexrender is not
compatible with the size of your regular text. Of course you can amend
this somewhat by using the *extarticle* documentclass (as suggested) but
if you want to further adjust it, use for example

-geometry
86%

to size the output to exactly 86% (or whatever you need).
So, whenever I want to do some Dvonn-blogging from now on I’ll change my
class.latexrender.php file as follows

$command =
$this->_convert_path." -crop 0x0-10% -crop 0x0+10% -density
".$this->_formula_density. " -geometry 80%
-transparent \"#FFFFFF\" ".$this->_tmp_filename.".ps ".
$this->_tmp_filename.".".$this->_image_format;

which
produces the output

$\xymatrix@=.3cm @R=.7cm{.& & & & & & & & & &
& & & \\ & & & \Black{2} \connS & & \bull{d}{5} \conn & & \bull{e}{5}
\conn & & \bull{f}{5} \conn & & \bull{g}{5} \conn & & \bull{h}{5} \conn
& & \SWhite \connS & & \SWhite \connS & & \SWhite \conneS & & & \\ & &
\bull{b}{4} \conn & & \SBlack \connS & & \Black{6} \connS & &
\bull{e}{4} \conn& & \bull{f}{4} \conn & & \bull{g}{4} \conn & &
\bull{h}{4} \conn & & \SWhite \connS & & \SWhite \connS & & \SWhite
\conneS & & \\ & \SBlack \connbeginS & & \SBlack \connS & &
\BDvonn{7} \connS & & \bull{d}{3} \conn & & \SBlack \connS & &
\BDvonn{6} \connS & & \bull{g}{3} \conn & & \bull{h}{3} \conn & &
\Dvonn \connS & & \SWhite \connS & & \SWhite \connendS & . \\ & &
\Black{5} \connbeginS & & \bull{b}{2} \conn & & \SBlack \connS & &
\bull{d}{2} \conn & & \bull{e}{2} \conn & & \bull{f}{2} \conn & &
\bull{g}{2} \conn & & \bull{h}{2} \conn & & \SWhite \connS & & \SWhite
\connendS & & \\ & & & \bull{a}{1} \con & & \bull{b}{1} \con & &
\Black{5} \conS & & \bull{d}{1} \con & & \bull{e}{1} \con & &
\bull{f}{1} \con & & \bull{g}{1} \con & & \bull{h}{1} \con & & \White{2}
& & & \\ . & & & & & & & & & & & & & } $

which (I hope) you will
find slightly better…

Leave a Comment

dvonn (1) mobility

[Dvonn](http://www.gipf.com/dvonn $ is
the fourth game in the [Gipf Project](http://www.gipf.com/project_gipf/index.html) and the most
mathematical of all six. It is a very fast (but subtle) game with a
simple [set of rules](http://www.gipf.com/dvonn/rules/rules.html). Here
is a short version

DVONN is a stacking game. It is played
on an elongated hexagonal board, with 23 white, 23 black and 3 red
DVONN-pieces. In the beginning the board is empty. The players first
place the DVONN-pieces on the board and next their own pieces. Then they
start stacking pieces on top of each other. A single piece may be moved
1 space in any direction, a stack of two pieces may be moved two spaces,
etc. A stack must always be moved as a whole and a move must always end
on top of another piece or stack. If pieces or stacks lose contact with
the DVONN pieces, they must be removed from the board. The game ends
when no more moves can be made. The players put the stacks they control
on top of each other and the one with the highest stack is the winner.
That’s all!

All this will become clearer once we fix a
specific end-game, for example

$\xymatrix@=.3cm @!C @R=.7cm{ & &
\Black{2} \connS & & \bull{d}{5} \conn & & \bull{e}{5} \conn & &
\bull{f}{5} \conn & & \bull{g}{5} \conn & & \bull{h}{5} \conn & &
\SWhite \connS & & \SWhite \connS & & \SWhite \conneS & & \\ &
\bull{b}{4} \conn & & \SBlack \connS & & \Black{6} \connS & &
\bull{e}{4} \conn& & \bull{f}{4} \conn & & \bull{g}{4} \conn & &
\bull{h}{4} \conn & & \SWhite \connS & & \SWhite \connS & & \SWhite
\conneS & \\ \SBlack \connbeginS & & \SBlack \connS & & \BDvonn{7}
\connS & & \bull{d}{3} \conn & & \SBlack \connS & & \BDvonn{6} \connS &
& \bull{g}{3} \conn & & \bull{h}{3} \conn & & \Dvonn \connS & & \SWhite
\connS & & \SWhite \connendS \\ & \Black{5} \connbeginS & &
\bull{b}{2} \conn & & \SBlack \connS & & \bull{d}{2} \conn & &
\bull{e}{2} \conn & & \bull{f}{2} \conn & & \bull{g}{2} \conn & &
\bull{h}{2} \conn & & \SWhite \connS & & \SWhite \connendS & \\ & &
\bull{a}{1} \con & & \bull{b}{1} \con & & \Black{5} \conS & &
\bull{d}{1} \con & & \bull{e}{1} \con & & \bull{f}{1} \con & &
\bull{g}{1} \con & & \bull{h}{1} \con & & \White{2} & &} $

with
White to move. Some comments about notation : the left-slanted columns
are denoted by letters from a (left) to k (right) and the rows are
labeled 1 to 5 from bottom to top (surprisingly this ‘standard’
webgame-notation differs from the numbering on my Dvonn-board where the
rows are labeled from top to bottom…). So, for example, the three
spots on the upper right are k3,k4 and k5 (there are no k1 or k2 spots).
The three Dvonn pieces are colored red and in the course of the game a
stack may land on a Dvonn piece and so stacks containing a Dvonn piece
are denoted with a red halo. For example, the symbol on spot f3 stands
for for a stack of 6 pieces, one of which is a red Dvonn piece, under
the control of Black (that is, the top-piece is Black). Further note
that a piece or stack can only move if it is not surrounded by 6 other
pieces or stacks (so the White pieces on j3 and j4 cannot (yet) move). A
piece can only move by one step in either line-direction provided there
is another piece or stack on that position. The same applies for stacks
: an height 3 stack for example can move in each lin-direction by
exactly 3 steps provided there is a piece or stack to jump onto. For
example, the height 6 stack on d4 can only move to j4 whereas the height
6 stack on f3 cannot move at all! Similarly, the two black height 5
stacks are immobile. At the moment black has all its stacks defended,
that is, if White should be able to jump onto one of them (which White
cannot at the moment), Black can use one of its neighbouring pieces to
take the stack back under its control. So, any computer program would
‘evaluate’ the position as favourable for Black : Black has stacks of
total height 34 safely under control (there are no immediate threats to
be seen : the [horizon effect](http://www.comp.lancs.ac.uk/computing/research/aai-aied/people/paulb/old243prolog/subsection3_7_5.html) in such programs) whereas White
can only claim potential stacks of total height 13… Still, Black
has already lost the game. White has more pieces which are quite mobile
as opposed to the immobile black stacks, so Black will soon run out of
moves to make and his end position will have some large stacks on the
third row. All white has to do is to let Black run out of moves and then
continue (Dvonn forces each player to make a move if they still can and
to pass the move otherwise, so the most mobile player can still continue
long after the other player was forced to stop) to build a White stack
of the appropriate height on the third row to jump on the highest Black
stack with its last move! Here is how the play continued : 1) j2-k3 ;
a3-b3 2) i1-k3 ; c5-c3 3) i2-i3 ; c2-c3 4) i3-k3 ; d4-j4 5)
j3-j4 ; e3-f3 6) i4-j4 ; c4-b3 to arrive at the position where
Black is no longer able to make any moves at all

$\xymatrix@=.3cm
@!C @R=.7cm{ & & \bull{c}{5} \conn & & \bull{d}{5} \conn & & \bull{e}{5}
\conn & & \bull{f}{5} \conn & & \bull{g}{5} \conn & & \bull{h}{5} \conn
& & \SWhite \connS & & \SWhite \connS & & \SWhite \conneS & & \\ &
\bull{b}{4} \conn & & \bull{c}{4} \conn & & \bull{d}{4} \conn & &
\bull{e}{4} \conn& & \bull{f}{4} \conn & & \bull{g}{4} \conn & &
\bull{h}{4} \conn & & \bull{i}{4} \connS & & \White{9} \connS & &
\SWhite \conneS & \\ \bull{a}{3} \connbegin & & \Black{3} \connS & &
\BDvonn{10} \connS & & \bull{d}{3} \conn & & \bull{e}{3} \conn & &
\BDvonn{7} \connS & & \bull{g}{3} \conn & & \bull{h}{3} \conn & &
\bull{i}{3} \conn & & \bull{j}{3} \conn & & \WDvonn{6} \connendS \\ &
\Black{5} \connbeginS & & \bull{b}{2} \conn & & \bull{c}{2} \conn & &
\bull{d}{2} \conn & & \bull{e}{2} \conn & & \bull{f}{2} \conn & &
\bull{g}{2} \conn & & \bull{h}{2} \conn & & \bull{i}{2} \conn & &
\bull{j}{2} \connend & \\ & & \bull{a}{1} \con & & \bull{b}{1} \con & &
\bull{c}{1} \con & & \bull{d}{1} \con & & \bull{e}{1} \con & &
\bull{f}{1} \con & & \bull{g}{1} \con & & \bull{h}{1} \con & &
\bull{i}{1} & &} $

Note that all pieces and stacks no longer
connected to a Dvonn piece must be removed. So, for example, after the
third move by Black, the Black height 5 stacks on c1 was removed. All
white now has to do is to built an height 8 stack on k3 and jump onto
the height 10 Black stack on c3 to win the game. The (only) way to do
this is by 7. j5-k5 and 8. k5-k3 to finish with 9. k3-c3 with final
position (note again that the White right-hand pieces and stacks are no
longer connected to a Dvonn piece and are hence removed)

$\xymatrix@=.3cm @!C @R=.7cm{ & & \bull{c}{5} \conn & & \bull{d}{5}
\conn & & \bull{e}{5} \conn & & \bull{f}{5} \conn & & \bull{g}{5} \conn
& & \bull{h}{5} \conn & & \bull{i}{5} \conn & & \bull{j}{5} \conn & &
\bull{k}{5} \conne & & \\\ & \bull{b}{4} \conn & & \bull{c}{4} \conn &
& \bull{d}{4} \conn & & \bull{e}{4} \conn& & \bull{f}{4} \conn & &
\bull{g}{4} \conn & & \bull{h}{4} \conn & & \bull{i}{4} \conn & &
\bull{j}{4} \conn & & \bull{k}{4} \conne & \\\ \bull{a}{3} \connbegin
& & \Black{3} \connS & & \WDvonn{18} \connS & & \bull{d}{3} \conn & &
\bull{e}{3} \conn & & \BDvonn{7} \connS & & \bull{g}{3} \conn & &
\bull{h}{3} \conn & & \bull{i}{3} \conn & & \bull{j}{3} \conn & &
\bull{k}{3} \connend \\\ & \Black{5} \connbeginS & & \bull{b}{2} \conn
& & \bull{c}{2} \conn & & \bull{d}{2} \conn & & \bull{e}{2} \conn & &
\bull{f}{2} \conn & & \bull{g}{2} \conn & & \bull{h}{2} \conn & &
\bull{i}{2} \conn & & \bull{j}{2} \connend & \\\ & & \bull{a}{1} \con &
& \bull{b}{1} \con & & \bull{c}{1} \con & & \bull{d}{1} \con & &
\bull{e}{1} \con & & \bull{f}{1} \con & & \bull{g}{1} \con & &
\bull{h}{1} \con & & \bull{i}{1} & & } $

So White wins with 18 to
Black’s 15. This shows that it is important to maintain mobility and
also that it is possible to win a Dvonn-game from computers. In fact,
the above end-game was played against a computer-program (Black). The
entire game can be found
[here](http://www.littlegolem.net/jsp/game/game.jsp?gid=426457&nmove=91)
.

One Comment