Cats, cucumbers and rail-booking algorithms

By: Daniel Elkan
Mon, 13 Nov 2023


A heads up: On Wednesday 15 November, at about 6am UK time, tickets for trains in France will go on sale for dates between 10 February and 24 March 2024.

Many of you will be wanting to book journeys for that period, using rail-booking websites like Rail Europe, Trainline, SNCF-Connect, Eurostar etc. If you do, there’s something worth knowing. But it starts with a question: 

Why are cats terrified of cucumbers? 

Because the answer is, in a way, the same reason that rail-booking websites don’t always show you the best journey schedules to the Alps. 

I know what you might be thinking: ‘Daniel’s got hold of a crackpipe and now he’s typing’. But bear with me. 

Firstly, a lot of people don’t know that a humble cucumber, unexpectedly encountered, can momentarily scare the wits out of a cat. YouTube is full of golden examples, like these:  


And, a lot of people who book train journeys to the Alps might quite reasonably imagine that a rail-booking website will always show the best available options. 

But it’s not always true. 

Cats being scared of cucumbers is a survival mechanism. On encountering a cucumber unexpectedly, a cat will instinctively react as if the object is a snake, because it might be. That means leaping out of the way, straight away.  

Although most cats will never encounter a snake, they are genetically wired to be afraid of them. Cats that weren’t scared of snakes didn’t survive as long. Better to be overcautious than to be something’s lunch.

Rail-booking websites are pre-programmed in a similar way, with algorithms that try to do the best job but don’t always manage. Here are some examples that might be useful to know: 

Algorithm problem #1: A rushed change of station in Paris

Many journeys to ski resorts involve a change of station in Paris, to switch from Eurostar to TGV. As long as you allow ample time, this is straightforward. But in the example below, the Rail Europe website has automatically suggested a journey with only 54 minutes between the arrival of the Eurostar at Gare du Nord and the departure of the TGV from Gare de Lyon.

That’s a bit tight. But as you can see in the screenshot below, there is actually a Eurostar that arrives into Gare du Nord 30 minutes earlier, and for a skier making the journey, it would be better if the website paired the TGV with this earlier Eurostar, giving a relaxed change of station in Paris. 

The Rail Europe website doesn’t show this, however, due to its over simplistic algorithm. In order to book a more relaxed change you need to book the Eurostar and TGV separately online, or contact a rail-booking agent (such as The Travel Bureau or Trainseurope) to book the journey for you. I actually raised this issue with the CEO of Rail Europe last week and he said that Rail Europe hopes that next year they will be able to do more to customise the algorithms better, for specific journeys. 

Algorithm problem #2: Journeys are shown, but not the most suitable one

A simple journey from London to Innsbruck: take a Eurostar to Brussels, then and ICE to Cologne, and then the NightJet sleeper train to Innsbruck. However, Trainline’s website doesn’t show this option, instead showing more complicated journeys – and no NightJet sleeper.

But the NightJet leg, does exist, as you can see on the OBB website in the screenshot below. It departs at Cologne at 22:27 and arrives at Innsbruck Hbf at 09:14.

Remember that Trainline says that it is ‘Europe’s leading train and coach app’ and a ‘one-stop-shop for train and coach travel’. It claims to offer ‘a comprehensive collection of travel options to our customers, as well as unique, AI-driven information to help them make the best decisions.’  

Clearly, this isn’t always the case. 

Algorithm problem #3: The reason for a journey not showing is not given

There are several reasons why a journey might not be on sale. But rail-booking website are hopeless at differentiating these reasons. Maybe it’s not their fault, and the train companies don’t provide it.  Whatever the cause, the outcome leaves a lot to be desired. When a train journey isn’t available, rail companies don’t say why. See an example below, from Rail Europe. 

The actual reason is that trains aren’t going to run between Paris and Oulx for the whole of winter. This is due to a landslide – please see our blog about it. But the website doesn’t state this.

In conclusion

The rail industry and rail booking websites have millions upon millions of pounds invested in them. And yet these problems persist. It’s good to be aware of them, because knowledge is power and you can travel better with more know how. 

The moral of this tale: don’t completely trust what you see online. And if you’re a cat, you can probably relax a bit more around the cucumbers.