user18769: Not having played chess in ~5 years, I started playing against the computer on my phone at ELO~800 (I've since reached ~900). I do not know what engine the app uses (Chess for iPhone by Mastersoft Ltd).
In my most recent game, which I ended up winning, the computer (Black) played what looked to me like an odd move (9. ...Ke7).
I'm wondering if anyone can shed some insight into this particular move. Why play it?
[fen ""]

1. d4 e6 2. h4 Be7 3. Bf4 Bxh4 4. e3 Qf6 5. Bc4 Nc6 6. Nf3 Na5 7. Bb5 Qd8 8. Nxh4 g6 9. Qd3 Ke7


For the curious, the full game is
[fen ""]

1. d4 e6 2. h4 Be7 3. Bf4 Bxh4 4. e3 Qf6 5. Bc4 Nc6 6. Nf3 Na5 7. Bb5 Qd8 8. Nxh4 g6 9. Qd3 Ke7 10. Qa3+ c5 11. Qxc5+ Ke8 12. Bd3 Qb6 13. Qe5 f6 14. Qe4 Qxb2 15. O-O Kf8 16. Nd2 Ke7 17. d5 d6 18. Qa4 e5 19. Qxa5 Kf7 20. Qc7+ Kf8 21. Nc4 Qb4 22. Rad1 exf4 23. exf4 Bg4 24. Rde1 Qb5 25. Qxd6+ Kg7 26. Na3 Qd7 27. Qc5 Rd8 28. Nc4 a6 29. f3 Qc8 30. Qa5 Bd7 31. Nd6 Qb8 32. Nf7 h6 33. Nxh8 Kxh8 34. Nxg6+ Kh7 35. Re7+ Nxe7 36. Nxe7+ Kh8 37. Qc3 Qd6 38. Nf5 Qf8 39. d6 Bxf5 40. Bxf5 Rxd6 41. Qb3 Kg7 42. Qxb7+ Kh8 43. Qh7#


user18168: The answer to your question is that there is no good reason to play this move. I plugged the position before Ke7 into StockFish on lichess. At depth 27, StockFish gives the position a +6.3 for white. After Ke7, the analysis jumps to +10.8 for white. Ke7 is a blunder.
StockFish aside, the only thing that this move does do is remove the pin placed by the white Bishop on the f-pawn. A better move to accomplish this goal (and indeed the one that StockFish suggests in this position) is a6.
This computer program is set to play generally poor moves - the 800 rating of the computer indicates that the computer is almost playing randomly - playing any better would increase its rating.
Note: I analyzed the position with SF (and mentally) because I didn't just want to tell the OP that the computer was playing poorly [it is, but that wouldn't make a good stand-alone answer IMO].

18769: <p>Not having played chess in ~5 years, I started playing against the computer on my phone at ELO~800 (I've since reached ~900). I do not know what engine the app uses (<code>Chess</code> for iPhone by <strong>Mastersoft Ltd</strong>).</p>

<p>In my most recent game, which I ended up winning, the computer (Black) played what looked to me like an odd move (9. ...Ke7).</p>

<p>I'm wondering if anyone can shed some insight into this particular move. Why play it?</p>

<pre><code>[fen ""]

1. d4 e6 2. h4 Be7 3. Bf4 Bxh4 4. e3 Qf6 5. Bc4 Nc6 6. Nf3 Na5 7. Bb5 Qd8 8. Nxh4 g6 9. Qd3 Ke7
</code></pre>

<hr>

<p>For the curious, the full game is</p>

<pre><code>[fen ""]

1. d4 e6 2. h4 Be7 3. Bf4 Bxh4 4. e3 Qf6 5. Bc4 Nc6 6. Nf3 Na5 7. Bb5 Qd8 8. Nxh4 g6 9. Qd3 Ke7 10. Qa3+ c5 11. Qxc5+ Ke8 12. Bd3 Qb6 13. Qe5 f6 14. Qe4 Qxb2 15. O-O Kf8 16. Nd2 Ke7 17. d5 d6 18. Qa4 e5 19. Qxa5 Kf7 20. Qc7+ Kf8 21. Nc4 Qb4 22. Rad1 exf4 23. exf4 Bg4 24. Rde1 Qb5 25. Qxd6+ Kg7 26. Na3 Qd7 27. Qc5 Rd8 28. Nc4 a6 29. f3 Qc8 30. Qa5 Bd7 31. Nd6 Qb8 32. Nf7 h6 33. Nxh8 Kxh8 34. Nxg6+ Kh7 35. Re7+ Nxe7 36. Nxe7+ Kh8 37. Qc3 Qd6 38. Nf5 Qf8 39. d6 Bxf5 40. Bxf5 Rxd6 41. Qb3 Kg7 42. Qxb7+ Kh8 43. Qh7#
</code></pre>
 18168: <p>The answer to your question is that <em><strong>there is no good reason to play this move.</strong></em> I plugged the position <em>before</em> Ke7 into StockFish on <a href="https://lichess.org" rel="nofollow noreferrer">lichess</a>. At depth 27, StockFish gives the position a <strong>+6.3</strong> for white. <em>After</em> Ke7, the analysis jumps to <strong>+10.8</strong> for white. Ke7 is a blunder.</p>

<p>StockFish aside, the only thing that this move <em>does</em> do is remove the pin placed by the white Bishop on the f-pawn. A better move to accomplish this goal (and indeed the one that StockFish suggests in this position) is <strong>a6</strong>.</p>

<p>This computer program is set to play generally poor moves - the 800 rating of the computer indicates that the computer is almost playing randomly - playing any better would increase its rating.</p>

<p><em>Note: I analyzed the position with SF (and mentally) because I didn't just want to tell the OP that the computer was playing poorly [it is, but that wouldn't make a good stand-alone answer IMO].</em></p>
