I'm working on a chess AI and have concerns for the performance later down the road.
Right now, my negamax tree contains every game state as you would expect, though each state stores the entire board in ASCII form, along with the fitness and methods.
Would the tree perform better if I were to trim the stored information down to, say, just the moved piece?
For example, instead of storing the entire ASCII board, store just "b2a2" (b2 moved to a2).
Thanks.
Would a minmax / negamax tree perform significantly better if the stored states contained little information?
106 Views Asked by Tyler At
1
There are 1 best solutions below
Related Questions in PERFORMANCE
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Using Amazon KMS service on Heroku
- How to have Heroku build my development branch on a staging server?
- Heroku not fetching from DB when scheduler running
- Search for a key in django.core.cache
- Ruby app fails in https request on heroku.com
- Rails: NameError: uninitialized constant Rails::Application::YAML
- clojure worker-only app on heroku fails with Error R10
- Clockwork not logging to Heroku console
- Javascript working in development locally but not production on Heroku
Related Questions in OPTIMIZATION
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Using Amazon KMS service on Heroku
- How to have Heroku build my development branch on a staging server?
- Heroku not fetching from DB when scheduler running
- Search for a key in django.core.cache
- Ruby app fails in https request on heroku.com
- Rails: NameError: uninitialized constant Rails::Application::YAML
- clojure worker-only app on heroku fails with Error R10
- Clockwork not logging to Heroku console
- Javascript working in development locally but not production on Heroku
Related Questions in TREE
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Using Amazon KMS service on Heroku
- How to have Heroku build my development branch on a staging server?
- Heroku not fetching from DB when scheduler running
- Search for a key in django.core.cache
- Ruby app fails in https request on heroku.com
- Rails: NameError: uninitialized constant Rails::Application::YAML
- clojure worker-only app on heroku fails with Error R10
- Clockwork not logging to Heroku console
- Javascript working in development locally but not production on Heroku
Related Questions in CHESS
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Using Amazon KMS service on Heroku
- How to have Heroku build my development branch on a staging server?
- Heroku not fetching from DB when scheduler running
- Search for a key in django.core.cache
- Ruby app fails in https request on heroku.com
- Rails: NameError: uninitialized constant Rails::Application::YAML
- clojure worker-only app on heroku fails with Error R10
- Clockwork not logging to Heroku console
- Javascript working in development locally but not production on Heroku
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Short answer: Yes, storing only the moves should be faster.
Long answer:
At each position, you have to have access to the current board. In general, chess engines use a data structure for the board, which includes a MakeMove and UnmakeMove operation. Then it is sufficient to store only the moves.
Technically, it is possible to avoid implementing a real UnmakeMove operation by internally keeping a stack of the positions. Then UnmakeMove just pops the stack. On some older architectures, this used to be very fast. If I'm not mistaken, Cray Blitz used that technique in the 80s.
Today, all engines that I know implement an UnmakeMove operation, as on todays machines cache efficiency is very important. Keeping a stack of positions puts too much pressure on the cache, so it is avoided.
By the way, as you mentioned that you are using an ASCII representation of the board, I would encourage you to read the Board Representation article on the chessprogramming wiki. Using an efficient representation of the board is crucial for performance.