I recently started working on my school project which is writing a chinese chess game with a computer player in Java, I want to represent the board with bitboards, however since the board is 9x10, bigint or double aren't large enough to represent it. I though about using the BigInteger class from java.math, however I'm afraid it isn't efficient and therefore I will run into problems whnen writing the code for the computer player.... Does anyone know how efficient the BigInteger class is? Will I run into problems with it when trying to calculate the best computer moves? Thanks.
Can BigIntegers be used in java to represent bitboards?
108 Views Asked by Orisade2003 At
1
There are 1 best solutions below
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in BIGINTEGER
- How to convert BigInt array representation to the Integer representation?
- Why is C# BigInteger not always the same bit length?
- Is calculating BigInt.pow(&BigInt) possible?
- Spring Boot - BigInteger value in the response body is not correct
- Convert BigInteger to ULong in Kotlin
- Why does Julia BigInt iterative functions overflow?
- How to deal with big integers in Elixir NIFs
- Go: convert big.Int to regular integer (int, int32, int64)
- how to convert a big int to a double in C++
- Electron build decreases performance
- Why does GMP use a pointer at the end of struct instead of zero sized array or Flexible Array Member?
- Conversion of Integer
- How to do modular arithmetics on big numbers in Swift?
- Sum of large numbers in java
- BigInteger logical operation takes more time in subsequent loops C#
Related Questions in CHESS
- chess endgame engine in Python doesn't work perfectly
- C++ program interacting with chess engine doesn't output without Sleep(8000)
- Why augmented_corners is not defined
- How to pull specific characters out of a string in R?
- Magic BitBoard C Chess Programming Question
- Is there a way to easily generate a chessboard with working button in React?
- Is hashing with string keys slower than hashing with number keys? (C#)
- How to space text printed in the python console?
- chess endgame: a problem with propagation upwards for a fully optimal game
- Chess engine performance/blunder issue after implementing transposition table in C#
- Chess.js How to access the various fields in .moves({ verbose: true})
- The Python code I created using Python and Tensorflow does not work as I want
- Python x Math: Find the expected number of moves of a rock to move from one corner to another
- python-chess stockfish analysis died unexpectedly
- How does Threefold Repetition get handeled with the Universal Chess Interface?
Related Questions in BITBOARD
- How can I optimize this transposition table for connect 4 AI?
- Magic BitBoard C Chess Programming Question
- How can I check for symmetry along the mid column in the board of Connect 4 in javascript when using bitboards?
- Pushing tiles using bitboards and bit operations
- Strange error when bit shifting uint64_t by a uint16_t in cpp
- genrating sliding piece moves on bitboard efficiently without magic bitboard
- Bitmaps/bitboards in Java
- Generating special magic numbers
- How does the binary representation of a C# ulong data type work?
- Unexpected bits appearing in binary conversion
- how are edge square attacks handled
- Chess bitboard move generation
- Rotate and reflect a 5x5 bitboard
- How to increase total positions considered for a chess engine
- Fast way of checking for alignment of in a 6x6 bitboard
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?
Either the Java SE
BitSetorBigIntegerclasses could be used to represent a bitboard. And I nooticed that there are alternatives to the standard Java SE implementations1.But the real question is whether you could come up with an alternative implementation of the bitboard abstraction that is more efficient than those general purpose data structures.
For example, if your bitboard requires 80 bits, then you could represent it as a
longarray of length 2 or anintarray of length 3. This should be at least as fast as the better ofBitSetorBigInteger, because those Java SEclasses both use arrays of integers under the hood.1 - A Google search is advised ...
My advice: pick whatever representation is easiest to use. Get interesting part of your game implementation working first. Then test it to see how fast it is. If it is not fast enough ... put some effort into profiling and optimizing it; e.g. by tuning the bitboard implementation. Don't optimize too early.