A team of Canadian and Finnish researchers has created a new computer algorithm that can play one of the most popular variants of poker essentially perfectly -- including bluffing.

According to its creators, it is virtually "incapable of losing against any opponent in a fair game", Nature reported.

The poker program devised by computer scientist Michael Bowling and his colleagues at the University of Alberta in Edmonton, Canada, along with Finnish software developer Oskari Tammelin, plays perfectly to all intents and purposes.

It means that this particular variant of poker -- called heads-up limit hold'em (HULHE) -- can be considered solved.

"The strategy the authors have computed is so close to perfect as to render pointless further work on this game," said Eric Jackson, computer-poker researcher based in Menlo Park, California.

"I think that it will come as a surprise to experts that a game this big has been solved this soon," Jackson added.

In poker, the main challenge is dealing with the immense number of possible ways that a game can be played.

As part of its developing strategy, the computer learned to inject a certain dose of bluffing into its plays.

Although bluffing seems like a very human, psychological element of the game, it is in fact part of game theory -- and, typically, of computer poker.

"Bluffing falls out of the mathematics of the game," says Bowling, and you can calculate how often you should bluff to obtain best results.

Of course, no poker algorithm can be mathematically guaranteed to win every game because the game involves a large element of chance based on the hand you are dealt.

But Bowling and his colleagues have demonstrated that their algorithm always wins in the long run.

This is a step beyond a computer program that can beat top human players, as IBM's chess-playing computer Deep Blue famously did in 1997 against Garry Kasparov, at the time the game's world champion, the report added.

The algorithm is described in a paper in Science.