user19047: My goal is to make a script to finding the most and least likely move an engine will play, and then make a list it. I tried using the scores to make such a list, with the best score equalling the most likely move,  but every time I got d ifferent scores for the same position. 
After compering high-scoring moves with engine moves with the code engine.play(board, chess.engine.Limit(time=0.100)), I noticed that the engine moves are totally different from the move that have the highest score on my outputs.
When I use the same version from my engine, but onvother sites that have the engine installed, I found that it chooses a different move from what my engine script chooses. I know that the engine is  not just a bot who is repeating moves every time, but what's the best way make it as such?
Here is my code if you want to have a look:
import asyncio
import chess
#import chess.uci
import chess.engine
import chess.pgn
import io
from chess.engine import Cp, Mate, MateGiven
#Let's try our code with the starting position of chess:

fen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
board = chess.Board(fen)


#Now make sure you give the correct location for your stockfish engine file
#...in the line that follows: e.g., /home/.../stockfish_6_x64


engine = chess.engine.SimpleEngine.popen_uci('/home/shar/Desktop/cheat detect python/stockfish-10-linux/Linux/stockfish_10_x64')

if board.turn: print( 'White to move');
else: print( 'black to move');
counter = 0
while counter < 1:
  # do processing
  counter = counter + 1

  result = engine.play(board, chess.engine.Limit(time=0.100))
  print('the engine move',result.move)

#getting legal moves scores part
for el in board.legal_moves:

    pgn = io.StringIO(board.san(el))

    thnwpgntofen = chess.pgn.read_game(pgn);
    nwinfo = engine.analyse(thnwpgntofen.board(),chess.engine.Limit(time=0.100));



    print(board.san(el),nwinfo.get("score"), nwinfo.get("depth"))



    print("-------------------------");


user19896: The volatility of the score here is caused by the time limit you have set. With time=0.100 you're restricting the engine to 100 milliseconds. With such a small time limit, there are a lot of small factors that can dramatically change the results. You can try increasing the time limit, or instead of using a time limit you can try a depth limit instead. This will make the engine search to a specific depth, rather than searching for a set amount of time. A depth limit will probably make your results more robust.
An example of depth limit would be:
chess.engine.Limit(depth=20)


19047: <p>My goal is to make a script to finding the most and least likely move an engine will play, and then make a list it. I tried using the scores to make such a list, with the best score equalling the most likely move,  but every time I got d ifferent scores for the same position. </p>

<p>After compering high-scoring moves with engine moves with the code <code>engine.play(board, chess.engine.Limit(time=0.100))</code>, I noticed that the engine moves are totally different from the move that have the highest score on my outputs.</p>

<p>When I use the same version from my engine, but onvother sites that have the engine installed, I found that it chooses a different move from what my engine script chooses. I know that the engine is  not just a bot who is repeating moves every time, but what's the best way make it as such?</p>

<p>Here is my code if you want to have a look:</p>

<pre><code>import asyncio
import chess
#import chess.uci
import chess.engine
import chess.pgn
import io
from chess.engine import Cp, Mate, MateGiven
#Let's try our code with the starting position of chess:

fen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
board = chess.Board(fen)


#Now make sure you give the correct location for your stockfish engine file
#...in the line that follows: e.g., /home/.../stockfish_6_x64


engine = chess.engine.SimpleEngine.popen_uci('/home/shar/Desktop/cheat detect python/stockfish-10-linux/Linux/stockfish_10_x64')

if board.turn: print( 'White to move');
else: print( 'black to move');
counter = 0
while counter &lt; 1:
  # do processing
  counter = counter + 1

  result = engine.play(board, chess.engine.Limit(time=0.100))
  print('the engine move',result.move)

#getting legal moves scores part
for el in board.legal_moves:

    pgn = io.StringIO(board.san(el))

    thnwpgntofen = chess.pgn.read_game(pgn);
    nwinfo = engine.analyse(thnwpgntofen.board(),chess.engine.Limit(time=0.100));



    print(board.san(el),nwinfo.get("score"), nwinfo.get("depth"))



    print("-------------------------");
</code></pre>
 19896: <p>The volatility of the score here is caused by the time limit you have set. With <code>time=0.100</code> you're restricting the engine to <code>100 milliseconds</code>. With such a small time limit, there are a lot of small factors that can dramatically change the results. You can try increasing the time limit, or instead of using a time limit you can try a <code>depth</code> limit instead. This will make the engine search to a specific depth, rather than searching for a set amount of time. A depth limit will probably make your results more robust.</p>

<p>An example of depth limit would be:</p>

<pre><code>chess.engine.Limit(depth=20)
</code></pre>
