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?
138 Views Asked by Tyler At
1
There are 1 best solutions below
Related Questions in PERFORMANCE
- Upsert huge amount of data by EFCore.BulkExtensions
- How can I resolve this error and work smoothly in deep learning?
- Efficiently processing many small elements of a collection concurrently in Java
- Theme Preloader for speed optimization in WordPress
- I need help to understand the time wich my simple ''hello world'' is taking to execute
- Non-blocking state update
- Do conditional checks cause bottlenecks in Javascript?
- Performance of sketch drastically decreases outside of the P5 Web Editor
- sample query for review for improvement on big query
- Is there an indexing strategy in Postgres which will operate effectively for JOINs with ORs
- Performance difference between two JavaScript code snippets for comparing arrays of strings
- C++ : Is there an objective universal way to compare the speed of iterative algorithms?
- How to configure api http request with load testing
- the difference in terms of performance two types of update in opensearch
- Sveltekit : really long to send the first page and intense CPU computation
Related Questions in OPTIMIZATION
- Optimize LCP ReactJs
- Efficiently processing many small elements of a collection concurrently in Java
- How to convert the size of the HTML document from 68 Kb to the average of 33 Kb?
- Optimizing Memory-Bound Loop with Indirect Prefetching
- Google or-tools soft constraint issue
- How to find function G(x), and make for every x, G(x) always returns fixed point for another function F(G(x))
- Trying to sort a set of words with the information theory to solve Worlde in Python but my program is way to slow
- Do conditional checks cause bottlenecks in Javascript?
- Hourly and annual optimization problem over matrix
- Sending asynchronous requests without a pre-defined task list
- DBT - Using SELECT * in the staging layer
- Using `static` on a AVX2 counter function increases performance ~10x in MT environment without any change in Compiler optimizations
- Is this a GCC optimiser bug or a feature?
- Performance difference between two JavaScript code snippets for comparing arrays of strings
- Distribute a list of positive numbers into a desired number of sets, aiming to have sums as close as possible between them
Related Questions in TREE
- Python - how to make tree without any library
- how to get the full path of antd tree
- Python Quadtree won't insert values
- Top View Of Binary Tree Depth First Search Using TreeMap
- Select/filter tree structure in postgres
- PySimpleGUI tree doesn't Insert data into tree
- Is it possible to create a node-link diagram with ggplot?
- Represent a full, but not complete, binary tree with an array structure
- Redirecting stdout with execvp
- Prevent selected node to be unselect primevue Tree component
- Binary Search Tree (BST) - array representations
- Debugging AVL Tree Deletion: Unbalanced Node Not on Deletion Path
- How to shorten line length in react-d3-tree
- installed dm-tree vs imported tree
- Why the height of segment tree is O(logn)
Related Questions in CHESS
- Eight Queens Puzzle in CLIPS
- Chess Engine TypeError: unhashable type: 'list'
- Making a chess game in Java, I want to move the pieces
- Are recursive computations with Apache Spark RDD possible?
- What is the maximum strength of a chess engine with a board representation using an 8 by 8 array?
- Get enemy's possible moves in chess to a 2D array - Python
- Collection View Cell Loading time
- telnetlib for python, how telnetlib can help me to figure out who is the person sending a tell to my BOT?
- friend declaration specifying a default argument must be a definition error
- N-Queens puzzle, but with all chess pieces
- Chess Validation Move input wanted
- How to put .gif files in the build directory
- Using a for-each loop within MouseClicked to getX and getY of each object
- C++ Builder - Piece.cpp(20): E2316 'Button1Click' is not a member of 'TForm'
- C++ Builder - Using same Event TWICE
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 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.