Lozza mate-in-1 game

Lozza home

You must solve 10 mate-in-1 puzzles against the clock.  Time penalties are added for illegal and wrong moves.  You must drag the piece to the mating square to solve the puzzle.  The puzzles are loaded at random from a collection of  ~250,000 sourced from here.

Click the image to play the game.


Critical feedback on how to improve this game is welcome.  Would it be nice to save the scores by user for example…?

NB: All the puzzles are loaded to your computer the first time you play.  It can take a little while depending on the speed of your internet connection.

Vax preventable outbreaks

The Council for Foreign Relations published an interesting page recently showing  vaccine preventable disease outbreaks 2006 – 2015.   The data they used can be downloaded, so I used it in a very simple way to experiment with a Google WebGL globe.  Click the image below to see it.


All the outbreaks, regardless of date and disease (mostly measles, mumps, rubella, pertussis and polio) are shown in blue with attacks shown in yellow-ish.  The size of the spike is linearly proportional to the number of cases, but it’s capped at 40000.  The actual maximum number of cases is 130000 in one instance but including  that reduces the smaller outbreaks to just dots.

The WebGL globe was very easy to work with but could do with some documentation!

The WHO report that in 2013 there were 16 deaths every hour from measles.

Lozza chess engine list

Lozza home

Unless otherwise stated these engines all support UCI messages via web workers (for use in browsers and jsUCI) and stdin/stdout (for use with node.js).


latest stable source: lozza.js
latest beta source: lozza.js

Confusingly my own engine Lozza has the same name as the project as a whole, but that’s just how it happened.  Lozza is hand coded Javascript.  A work still in progress that currently rates about 2200 as per CCRL 40/40.


source: garbo.js

Hand coded Javascript written by Gary Linscott with a UCI harness added by me.

Stockfish 5

source: stockfish.js

Javascript auto generated by transpiling the Stockfish version 5 C sources to LLVM then generating Javascript from that using emscripten.  A UCI harness was added by hand by the author.  See also this post for more relevant links.  Slow to initialise.


source: p4wn.js

Hand coded Javascript writttn by Douglas Bagnall.  A web worker UCI harness was added by Edmund Moshammer for testing jsUCI and tweaked by me for use in Lozza.  p4wn does not support node.js.  It does not show a PV when working.

Lozza – how to add an engine

Lozza home

If you would like to develop your own Javascript engine and use it within the Lozza UIs you have a number of options.

In all cases you can develop and test offline before uploading to Lozza. But please do feel free to upload as many times as you like during development once it’s basically working.  There is no automation as yet – just email it to me: op12no2@gmail.com – it’s a matter of a moment to ftp it up to the site.  Having said that please also feel free to fork my UIs and use them on your own site.

1.  Use one of the existing hand coded engines as a starting point and further develop it.  Check licencing with the author first of course, but you are free to use mine as you like: lozza.js.  If nothing else it’ll give you a framework for sending and receiving UCI messages.

2.  Use emscripten to transpile-kindasortaish your C/C++ engine into Javascript.  A brief description of the process can be found here in a Stockfish context.  The resulting code is gloop to read but works very well.  I’d love to find the time to do this for Fruit 2.1.

3. Hand code from scratch :)  I had (am having) a lot of fun writing lozza.js.

In the case of 2. and 3., you’ll need to add some code to send/receive UCI messages.  See the lozUCI object in lozza.js for example.  It’s not pretty but it works.  You’ll see that there is code to detect if the engine is in a node.js, web or jsUCI context – that’s a useful thing to do for maximum flexibility.  NB: the odd way I write to stdout in a node.js context is so that it’s synchronous, otherwise you get all the PV output in one gulp on Windows (its OK on Linux).




emscripten – example| example | example






web workers

Lozza acknowledgements

Lozza home

Edmund Moshammer for the indispensable jsUCI.

Norbert Raimund Leisner for designing Lozza logos.

Silvian Ruxy for testing Lozza.

Graham Banks for testing Lozza and including in the CCRL ratings.  Also for an alternative Lozza logo.

Chris Oakman for the lovely chessboard.js UI.

David Bau for seedrandom.js which I use to seed the Zobrist hashes.

Jeff Hlywa for the fab chess.js.

CPW for algorithms.  Lozza’s Q search is still pretty much all CPW.

CCC for algorithms and discussion.

Lozza – Using the engines offline

Lozza home

These notes apply to all the Javascript engines hosted by Lozza and all chess user interfaces.  The Lozza engine itself (lozza.js) and the Arena UI are used as examples.

The chess engines need a Javascript engine to live in.  Usually this is a web browser, but a web browser just embeds a Javascript engine, so other applications can too.  The most common are mentioned below.


Download Edmund Moshammer’s jsUCI (embeds Google’s V8 Javascript engine) to a folder of your choice. Download lozza.js and place it in the same folder as jsUCI.

Command line:-

cd <jsuci folder>
.\jsuci_1_2.exe lozza.js

User interface:-


You don’t have to use the same folders, it was just an example.  If lozza.js is in a different folder to jsUCI you need to specify the path on the command line and in the UI – absolutely or relative to jsUCI.


Download and install node.js (embeds V8).  node.js adds itself to your path. Download lozza.js to a folder of your choice.

Command line:-

cd <lozza folder>
node lozza.js

User interface:-


You can use node.js on Windows too instead of jsUCI.  When using node.js you can add Google Chrome V8 options to the command line to see the real time optimisation etc.


jxCore is a multi-threaded arrangement of node.js and also has a very nice packaging facility to turn the Javascript engine into an executable (this is how I generate executables for CCRL).  It can also target Mozilla’s Spider Monkey as an alternative to Google’s V8 engine as used by node.js and jcUCI.

The packaging facility creates an executable suitable for running on the platform doing the packaging.  So if you want Windows 64 and Linux executables, you need to package separately on each of those platforms.  It is however an effortless operation.  Using lozza.js for example:-

jx package lozza.js lozza -native

That’s it.  The Javascript itself must detect (see lozza.js) it’s in a node.js context and do the appropriate IO – which is different to the IO needed in a web worker (web or jsUCI) context.

Lozza UCI console UI

Lozza home


Optional URL parameters:-


In addition to the standard UCI protocol , the following commands can be used to control all the engines:-


Stop the engine.   Useful to stop a long perft or analysis.  What actually happens is that the web worker containing the engine is killed.


Start the engine.  i.e. create a new web worker containing the engine.


Clear the previous engine output.

Continue reading Lozza UCI console UI

Lozza – Javascript chess

Lozza as a word has become overworked in this project.  It started off describing a Javascript UCI chess engine (a she), but has more recently become to additionally represent the various web UIs hosting the engine – which are generic and can host other Javascript UCI chess engines as well.


I would very much like to thank these people for help during the (continuing) development of Lozza.




Indirect protection demo


A little demo to show how people are indirectly protected in an epidemic when enough people are vaccinated – herd immunity.

It should work on touch and non touch devices including phones; the layout being responsive to screen size.

The demo is not suitable for thinking about the elimination of a disease in an endemic steady state.  It is rooted in an epidemic context.

Continue reading Indirect protection demo

Homeopaths in denial

This is a tidy-up of a comment I posted on homeopath Steve Scrutton’s blog.

Steve, you don’t seem to understand what a denial means.

Imagine somebody (a he in this case) who anecdotally helps people by playing the piano. This goes on for years. People listen to the music and often feel better – either then or a little while later. Every now and again somebody with a serious illness will get better – breast cancer say (relatively high remission rate) – and he makes sure the world knows about cases like that (selection bias). Continue reading Homeopaths in denial

Vaccines are not 100% effective

It is not uncommon to see online discussions with arguments of the form “if your child is vaccinated, what risk is there from my unvaccinated child?”.

The fact is that while vaccines are generally very good, they are not 100% effective in terms of seroconversion rates. Some vaccinated individuals can still catch and transmit the diseases they have been vaccinated against; although often the symptoms are usually less severe than in the unvaccinated case. Continue reading Vaccines are not 100% effective

Vaccination resources

Many vaccination resources are entrenched in ideology and bias. Some are easy to spot with their emotional but anecdotal stories, conspiracy theories, logical fallacies and downright misinformation. Others have in initial air of respectability and may even appear to be science based, until you dig a little deeper and reveal that the science is cherry picked with studies that are methodologically weak, have since been retracted, or have subsequently been shown to have reached false conclusions. Continue reading Vaccination resources

The chemical makes the poison – apparently

Thimerosal is a mercury based organic compound that is used both as a preservative in vaccines and as a sterilising agent during the vaccine manufacturing process.

With the exception of some multi-dose flu vaccines, thimerosal was removed as a preservative from all childhood vaccines in 2001, with the last expiry date being Jan 14 2003. It is however, still present as trace quantities of mercury in some childhood vaccines (e.g. DTaP vaccines) due to the manufacturing process:- Continue reading The chemical makes the poison – apparently

Meryl down the rabbit hole

meryl doery down the rabbit holeThis is a slight modification of a comment I posted on an article about Meryl Dorey in the Australian Northern Star.

Ayaan Hirsi Ali was once asked how to get through to Somali women that their life was one of total repression and she answered “dissonance”. Her idea being that if you repeatedly hit people with the truth, their beliefs may eventually crack – dissonance will accumulate until a point is reached that no amount of rationalising can support the root belief/bias/ideology. Continue reading Meryl down the rabbit hole

The Australian Vaccination Network is an anti-vaccination group

Like many anti-vaccination groups, the Australian Vaccination Network (AVN) presents itself as “pro-choice” or “informed decision” or “balanced” and at first glance the website seems to support that view, but dig a little deeper and their true orientation becomes clear.  What for example is balanced about a tee-shirt that can be purchased in their online shop saying “Love them, Protect them, Never inject them”. Continue reading The Australian Vaccination Network is an anti-vaccination group

Vaccines do not weaken a child’s immune system

Paul Offit et. al. review the evidence as to whether or not vaccinations overwhelm a child’s immune system, concluding:-

Current studies do not support the hypothesis that multiple vaccines overwhelm, weaken, or “use up” the immune system. On the contrary, young infants have an enormous capacity to respond to multiple vaccines, as well as to the many other challenges present in the environment. By providing protection against a number of bacterial and viral pathogens, vaccines prevent the “weakening” of the immune system and consequent secondary bacterial infections occasionally caused by natural infection. Continue reading Vaccines do not weaken a child’s immune system

In a highly vaccinated context more infections can be found in those who are vaccinated


Much is often made of the fact that in a highly vaccinated context the number of infected vaccinated individuals can be greater than the number of infected unvaccinated individuals; the conclusion being that vaccination doesn’t work – but that conclusion is a logical fallacy. Continue reading In a highly vaccinated context more infections can be found in those who are vaccinated

Vaccination is a social responsibility

What a wonderful thing it is to be able to vaccinate our children, not just to protect them, but those around them that are too young to be completely vaccinated or cannot be vaccinated for heath reasons. What a wonderful gift herd immunity is to and from humanity. Yes there are risks of adverse reactions to vaccination but such risks are microscopic and completely outweighed by the benefits. Continue reading Vaccination is a social responsibility