Training with RomiChess in console mode

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Training with RomiChess in console mode

Post by Michael Sherwin »

If one wants to try training with RomiChess but cannot get the training to work with their favorite GUI it is possible to train with Romi in the console. Type a depth like, sd 12 <enter>, or a time in seconds like, st 30 <enter>. Type go <enter> to make Romi play white or enter a move like e2e4 to get things started. Then when you want to quit and adjudicate the game type result 1-0 <enter> for a white win, result 0-1 <enter> for a black win or result 1/2-1/2 <enter> for a draw. To quit enter quit. To start a new game enter new. Romi will learn the game and you are on the way. To promote a pawn e7e8q or e7e8n etc and to castle e1g1 or e1c1.

If someone knows of a GUI that sends the result command in human vs computer games please report it here. And please if you try training against RomiChess let us know of your experience! :D

(I think I got everything correct if not let me know)
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Training with RomiChess in console mode

Post by Michael Sherwin »

RomiChess was never intended for computer vs computer competitions. Its focus has always been meant as a sparring partner for humans. It was designed with the idea that the human and computer could learn from each other. The human could then explore their chosen openings very thoroughly because they would switch sides and learn their opening choices from both sides. This would be an incredibly powerful training technique.

But in the 12 years that Romi has had this ability I have never gotten one response about Romi being used as intended. And not one mention of the idea in conversation here at TalkChess or before at the Winboard forum.

Can someone explain that to me because I just do not get it? Even though it works in Winboard or at least it did 12 years ago maybe people just do not use Winboard to play against the computer. I just do not know.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Training with RomiChess in console mode

Post by Ovyron »

Probably because we'd rather play real humans?

I used to mix playing against computer and playing against humans, back with some old version of Pro Deo. I'd learn the engine's tactics and use them against the human opponents, and I'd try to use the tricks I learned when defeating the engine (at low depth) against humans.

Back then I had a rating of about 1100.

Now I have a rating of about 1750.

What did I learn from the 650 elo jump?

Well, first, that there's only so much that engines are going to teach you. Once you reach diminishing returns, it's better to play twice against humans, than once against human and once against computers, this is because...

Human chess and engine chess are entirely different games.

Against humans you can hang up the queen, and the opponent may miss it. Against an engine the game may basically be over after you blunder a pawn.

Conversely, you're going to defeat the human because they'll play natural mistakes, and you're going to defeat the engine when it plays moves you'll never find in real games.

One thing that I suferred from, from fighting with engines was a "defeatist" attitude. When you blunder against an engine, you will see that the game only gets harder and harder, and eventually become hopeless. I don't ever recall defeating an engine when down on material...

I applied this to human chess, so when they were up two pawns, or the exchange, or a piece, I'd just go and resign.

But, the truth about human chess opponents, that engines can't teach you, is:

That the human elo fluctuates a lot during the game.

What you need to do is keeping your elo as constant as possible, so you punish the opponent whenever they fluctuate and play weaker than you.

I have defeated several +1900 elo players in recent weeks, and I can say that they play like this:

+2800 elo Opening (they can play the opening just as well as Magnus Carlsen)
+3500 elo Once out of book, you may see Alpha Zeroesque moves that could take Stockfish hours to find
+1900 elo These guys are though to beat because they play at their rating in average, so if you're a +1700 you're playing 200 elo below them, in average.
+1700 elo But once in a while they will play just like you, specially in tactically quiet positions.
+1500 elo Specially when they see they're not making progress against you, they may start sacrificing pawns, and other material, to create tactics potentials, and if you're not solid enough, you will die in some attack, but these are unsound moves, there's some continuation that defeats their moves that is there, and if you find it, you'll get an advantage
+1200 elo The reason these guys aren't rated higher is because they get destroyed by 2100 elo players just like they destroy you, and it's when they play these terrible moves that you're not exploiting, but a stronger player would. These are the kind of moves that may be deep, or may only be found by an engine in postmortem, but these are patterns that repeat, and you gain elo as you learn to recognize them.
+0 elo 1900 elo players hang pieces, or the queen, or allows a mating attack, all the time, and you may not notice because of panic, or because of you have your plan set, and the opponent's blunder doesn't stop it, so you continue with your plan, instead of taking advantage of the blunder.

Something else that humans do, that engines don't, is playing in a segment of the board, like, a part of the board that only exists, and the rest of it doesn't matter. The opponent may be down a full piece on the entire board, but up a rook in the segment that s/he's playing, so if you play on the segment that they're ignoring, you just give them extra tempo, so you should be aware of the segment of the board that matters. Engines always play the full board.

A main difference between Romi learning and human learning is pattern recognition. If you defeat a human by having a Bishop on g2 and making a discovered attack on their a8 rook by moving away the knight, that's a pattern they will recognize, in future games they may even play c6 instinctively to protect themselves against it, after you put a bishop on g2.

Romi, and other learning engines, can't learn such patterns, and if they have learned a lot in a variation, and you play against them with exactly the same principles (that is, all their learning would apply to the current position) but with a pawn on a3, they've never seen this before, so the learning does nothing.

You have to ask why humans play chess, and why would they choose to play it agaisnt an engine or a human.

Currently there's places like lichess that allow tournaments in where it's very easily to play opponents 200 or 400 elo stronger than you, that will teach you how strong humans play, allowing you to see their holes, to learn how to defeat them in the future, as you can check offline what mistakes they made, learn the patterns that would work in the future, and maybe next time, trap their queen (this isn't theory, I have done it.)

In contrast, playing Romi, or any other engine, and beating it, is only going to help you against engines, but has no practical value on games against humans, so this is my guess about why a learning feature doesn't make it more enticing to play against one.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Training with RomiChess in console mode

Post by hgm »

Michael Sherwin wrote:But in the 12 years that Romi has had this ability I have never gotten one response about Romi being used as intended. And not one mention of the idea in conversation here at TalkChess or before at the Winboard forum.

Can someone explain that to me because I just do not get it? Even though it works in Winboard or at least it did 12 years ago maybe people just do not use Winboard to play against the computer. I just do not know.
RomiChess is a computer program that plays orthodox Chess, just like a thousand other programs. It is not the strongest, by far, so it is o good for analysis. But it is probably way to strong for any human to stand a chance again it. So there will about zero interest in it.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Training with RomiChess in console mode

Post by Michael Sherwin »

Hi Ulysses, So basically made up minds filled with preconceived notions that are not true in Romi's case.

1) a3 Even if Romi sees a3 in a line for the first time there have been values loaded into the hash before a3 was played (assuming a3 was not played very early) and the values loaded into the hash affected the search stats which are fed to the eval that modifies the piece square tables which affect the search, etc. So long after unseen before a3 is played the pst's are still resulting in different learned play.

2) Romi has always been called a very human like opponent. Believe me she will hang stuff and leave her king vulnerable. Juust set Romi to search 3 ply and see how bad it is, lol. And yet it will still learn to play better moves.

3) In 40/40 Romi sometimes plays better than SF and in some positions it plays worse than TSCP and that varies during the game. Just ask the people that watch Romi play at Graham's tournaments.

I'm not feeling well enough to comb through all your comments but I think that I covered your main objections.

Thanks! :D
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Training with RomiChess in console mode

Post by Michael Sherwin »

Okay Everyone, Ulysses too, :D I just downloaded the latest Arena and started a human versus computer match between myself and RomiChess. It switched sides every time and the learning worked perfectly. I set Romi to 2 ply and I won against Romi easily. Then Romi played my moves back against me in the next game. And the next game and the next. After I ended the match I doubled checked the learn file and all was well.

So Ulysses, please check this out as a favor to me and give us your thoughts! Maybe set up a favorite position that you might want to explore with a pgn file. Of course set up the best time control for you! I'm excited now, because it works! :D Remember to start off with a new learn file.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Training with RomiChess in console mode

Post by carldaman »

Michael Sherwin wrote:Okay Everyone, Ulysses too, :D I just downloaded the latest Arena and started a human versus computer match between myself and RomiChess. It switched sides every time and the learning worked perfectly. I set Romi to 2 ply and I won against Romi easily. Then Romi played my moves back against me in the next game. And the next game and the next. After I ended the match I doubled checked the learn file and all was well.

So Ulysses, please check this out as a favor to me and give us your thoughts! Maybe set up a favorite position that you might want to explore with a pgn file. Of course set up the best time control for you! I'm excited now, because it works! :D Remember to start off with a new learn file.
I can attest that Romi is not unbeatable. I did get a draw vs the prior version, and another time attained a clearly winning position, outplaying the latest Romi, before blundering badly. It is an excellent sparring partner, IF you're looking for a strong opponent. If not, then I can recommend an engine like AliBaba or Zotron. :)

Thanks again, Michael, for the last bugfix - it really works as intended now. :D

I do have a couple of questions:

1. How can you set Romi to x plies?
2. How can the hash size be changed, if at all?

I checked the readme file and must have missed the answers if posted elsewhere.

Cheers,
CL
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Training with RomiChess in console mode

Post by Michael Sherwin »

carldaman wrote:
Michael Sherwin wrote:Okay Everyone, Ulysses too, :D I just downloaded the latest Arena and started a human versus computer match between myself and RomiChess. It switched sides every time and the learning worked perfectly. I set Romi to 2 ply and I won against Romi easily. Then Romi played my moves back against me in the next game. And the next game and the next. After I ended the match I doubled checked the learn file and all was well.

So Ulysses, please check this out as a favor to me and give us your thoughts! Maybe set up a favorite position that you might want to explore with a pgn file. Of course set up the best time control for you! I'm excited now, because it works! :D Remember to start off with a new learn file.
I can attest that Romi is not unbeatable. I did get a draw vs the prior version, and another time attained a clearly winning position, outplaying the latest Romi, before blundering badly. It is an excellent sparring partner, IF you're looking for a strong opponent. If not, then I can recommend an engine like AliBaba or Zotron. :)

Thanks again, Michael, for the last bugfix - it really works as intended now. :D

I do have a couple of questions:

1. How can you set Romi to x plies?
2. How can the hash size be changed, if at all?

I checked the readme file and must have missed the answers if posted elsewhere.

Cheers,
CL
Thanks Carl I'm glad it works correctly!

In console mode sd n. Like sd 8 to set depth. In Arena there is a setting for depth as well.

The hash size is a constant. A larger hash does not help.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Training with RomiChess in console mode

Post by Ovyron »

Michael Sherwin wrote:I set Romi to 2 ply and I won against Romi easily. Then Romi played my moves back against me in the next game.
Okay, so Romi could work by learning from a PGN Database from the site where one plays, then Romi would play the winning moves of the people from there, and, at least until a novelty is played, one would be playing against the strongest humans from the site.

I play at lichess, here's their games...

https://database.lichess.org/

Whoa! The games just from the month of November are 3.6GB in size! This would be a big project, so I wonder if someone else that plays at Lichess would be willing to feed the PGNs to Romi and give this concept a try :lol:
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Training with RomiChess in console mode

Post by carldaman »

Ovyron wrote:
Michael Sherwin wrote:I set Romi to 2 ply and I won against Romi easily. Then Romi played my moves back against me in the next game.
Okay, so Romi could work by learning from a PGN Database from the site where one plays, then Romi would play the winning moves of the people from there, and, at least until a novelty is played, one would be playing against the strongest humans from the site.

I play at lichess, here's their games...

https://database.lichess.org/

Whoa! The games just from the month of November are 3.6GB in size! This would be a big project, so I wonder if someone else that plays at Lichess would be willing to feed the PGNs to Romi and give this concept a try :lol:
I suspect a large percentage of those games are of low-quality. I'd rather not fill up Romi's learning file with junk, if it were me. Just the opposite, in fact.