Git Product home page Git Product logo

mephisto-emu's Introduction

Mephisto-emu

An experimental emulator for the Mephisto MM2 chess computer, providing a UCI compatible interface. Maybe other boards in the Mephisto Modular series will be added later.

Quickstart

git clone https://github.com/BierLiebHaber/mephisto-emu

cd mephisto-emu

Get the MM2 rom file (I used version 400, tho others should also work) from somewhere and rename it to MM2.rom. Get the hg240.rom rom file from somewhere. Put both into the mephisto-emu folder.

cargo build -r

./start.sh

Known Bugs/Limitations

  • using the engine with a fixed movetime needs quite a big margin (> 1sec) since we need to extract the info for the best current move
  • all other go modifiers except movetime are unsupported
  • while we do return a ponder move there is no way to actually use this information in the engine
  • the first move in a new game (or movestack) can not be canceled by movetime or the stop command

mephisto-emu's People

Contributors

bierliebhaber avatar

Watchers

 avatar

mephisto-emu's Issues

Crash... last move should be d7f5 instead of d7f6 I think.

movestack f7e7                                                                                                                                                                                                                                                                                [0/1880]
movestack a7b7                                                           
movestack g4d7                                                           
movestack h4g6                                                           
movestack e7f6                                                           
movestack b7d7                                                           
movestack f6g6                                                           
Round:  3                                                                
  -----------------                                                      
8 |.|.|.|.|.|♗|.|.|                                                      
  -----------------                                                      
7 |.|.|.|♛|.|.|♙|.|                                                      
  -----------------                                                      
6 |♙|.|.|♙|.|.|♔|♙|                                                      
  -----------------                                                      
5 |.|.|.|.|.|.|.|.|                                                      
  -----------------                                                      
4 |.|.|.|.|♟|.|.|.|                                                      
  -----------------                                                      
3 |.|.|.|.|.|.|.|.|                                                      
  -----------------                                                      
2 |♟|♟|♟|♟|.|♟|♟|♟|                                                      
  -----------------                                                      
1 |♜|.|♝|.|♚|.|.|♜|                                                      
  -----------------                                                      
   a b c d e f g h                                                       
Traceback (most recent call last):                                       
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1965, in _parse_uci_bestmove
    move = board.push_uci(tokens[0].lower())                                                                                                       
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                       
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/__init__.py", line 3164, in push_uci
    move = self.parse_uci(uci)                                           
           ^^^^^^^^^^^^^^^^^^^                                           
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/__init__.py", line 3147, in parse_uci
    raise IllegalMoveError(f"illegal uci: {uci!r} in {self.fen()}")                                                                                
chess.IllegalMoveError: illegal uci: 'd7f6' in 5b2/3Q2p1/p2p2kp/8/4P3/8/PPPP1PPP/R1B1K2R w KQ - 0 22

During handling of the above exception, another exception occurred:                                                                                

Traceback (most recent call last):                                       
  File "/home/chess/engine_vs_engine/main.py", line 115, in <module>                                                                               
    main(mep_emu, texel)                                                 
  File "/home/chess/engine_vs_engine/main.py", line 103, in main                                                                                   
    asyncio.run(                                                         
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run                                                                                  
    return runner.run(main)                                              
           ^^^^^^^^^^^^^^^^                                              
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run                                                                                  
    return self._loop.run_until_complete(task)                                                                                                     
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                     
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()                                               
           ^^^^^^^^^^^^^^^                                               
  File "/home/chess/engine_vs_engine/main.py", line 62, in run_game                                                                                
    result1 = await engine1.play(board, limit1)                                                                                                    
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                    
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1789, in play
    return await self.communicate(UciPlayCommand)                                                                                                  
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                  
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1133, in communicate
    return await command.result                                          
           ^^^^^^^^^^^^^^^^^^^^                                          
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1386, in _line_received
    self.line_received(engine, line)                                     
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1726, in line_received
    self._bestmove(engine, line.split(" ", 1)[1])                                                                                                  
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1745, in _bestmove
    best = _parse_uci_bestmove(engine.board, arg)                                                                                                  
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                  
  File "/home/chess/engine_vs_engine/.venv/lib/python3.11/site-packages/chess/engine.py", line 1967, in _parse_uci_bestmove
    raise EngineError(err)                                               
chess.engine.EngineError: illegal uci: 'd7f6' in 5b2/3Q2p1/p2p2kp/8/4P3/8/PPPP1PPP/R1B1K2R w KQ - 0 22

Movestack:

  1. e4 e5 2. Nf3 Nc6 3. Bc4 Nge7 4. Nc3 a6 5. Ng5 Nd5 6. Nxd5 h6 7. Nxf7 Qh4 8. Nxc7+ Ke7 9. Bd5 Nb4 10. Nxh8 Nxd5 11. Ng6+ Kf7 12. Nxh4 Nxc7 13. Qh5+ Kg8 14. Qxe5 d6 15. Qa5 Bg4 16. Qxc7 Ra7 17. Qb8 Kf7 18. Qxa7 Ke7 19. Qxb7+ Bd7 20. Ng6+ Kf6 21. Qxd7 Kxg6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.