Giter VIP home page Giter VIP logo

pygone's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @scs-ben
  • ๐Ÿ‘€ Iโ€™m interested in PHP development with some occasional tinkering in other things like Python or C or (Lord forbid) .NET
  • ๐Ÿ“ซ You can reach me at breese AT scsgrandrapids DOT com

pygone's People

Contributors

aloril avatar scs-ben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aloril

pygone's Issues

python adding bug

i just discovered a bug in your code .. here are the concerning lines in pygone.py :

pygone-add-bug

in python (3) the operator '++' (to add one) does NOT exist, in C / CPP it DOES. This is a design decision, see eg. https://www.askpython.com/python/examples/python-increment-operation . However, python3 (or pypy3) gives NO error or warning when using this construct, nothing just happens, the variable will stay the same. Note that played_moves++ WILL give an error.

it seems this little bug does not influence the working of Pygone (v1.5.4) too much, but when you confirm my case, this should be fixed ..

compile on Linux fails

hi, i just discovered your engine .. but i can not compile it on Xubuntu 22.04 :

~/Compiled/pygone/src$ make
pyminifier -o pygone-mini.py pygone.py && bash shrink.sh && python3 combine.py pygone-mini.py > ../bin/pygone && chmod +x ../bin/pygone && gzexe ../bin/pygone && ls -l ../bin/pygone && rm ../bin/pygone~
/bin/sh: 1: pyminifier: not found
make: *** [Makefile:2: pygone] Error 127

i followed your README instructions to build .. it's unclear though : should i edit prepare.sh and THEN do make ?

improvement ideas

hi,

didnt know where to post this so sorry for creating an issue..
If you want to prefer shorter mates you can easily change this line

return -self.eval_mate_upper if is_in_check else 0

to
return -self.eval_mate_upper + ply

i dont see any ply information yet but this is just the distance from the root, depth might not be accurate because of extensions..

you can then remove this

# try to reduce path to mate

also this looks very dangerous

tt_bucket = {}

while python dictionaries look awesome for a tt, that tt implementation will grow infinitely if im not mistaken...

you can do something like this instead to create a list with a fixed amount of elements

        tt_size = 2**19-1
        transposition_table = [[] for _ in range(tt_size)]

and then you can calculate the index

index = hash % (tt_size - 1)

of course you would need to implement a hashing schema for this first...

additionally I think you are restricting the ttmove too much, you should always search it first if it is a legal move in the position, regardless of pvnode, check or entry depth..

if not is_pv_node and not is_in_check and tt_entry['tt_depth'] >= v_depth and abs(tt_entry['tt_value']) < self.eval_mate_upper and tt_entry['tt_move']:

also if the ttmove is < beta you continue to search all other moves but you allow the ttmove to be searched again, just add a continue in your for loop

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.