I am building a chess GUI, which is supposed to talk to Stockfish. I have heard that I have to generate a FEN-string, to tell Stockfish about the move that has been made. So the question is, how do I do this? I have really met a dead end here.. I am using the Eclipse IDE.
How to generate a FEN-string and send it to Stockfish?
4.1k Views Asked by AudioBubble At
2
There are 2 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in STRING
- SML - Find same elements in a string
- match hex string with list indice
- How can I determine the index of the same set of characters between two strings that are of different lengths?
- String.replace() isn't working like I expect
- How to do a case-insensitive string comparison?
- Trying to save an np array with string and floats, but getting a error
- String replace with integer not working
- How to calculate a length of array with out using library
- Java replace every Nth specific character (e.g. space) in String
- Split the strings into two parts Python
- Perl Regex: Merge multiple one-character substrings
- Squid S2275 does not know about format string argument indexes
- more efficient way of remove a few characters from the end of a string
- python member str performance too slow
- String.split() not behaving in android
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
Related Questions in UCI
- OpenWrt LibUbi implementation
- Connecting a Chess Engine to an Existing GUI made with Javascript
- Dimensionality Reduction using Self Organizing Maps
- Java - Running a subprocess works locally but fails with "broken pipe" when ran on Heroku?
- chess engine keeps calculating old fen position once a new fen is given
- Unable to find one-to-many relationship, entity: moj_lawsystem, referencing entity: activityparty
- Can I include OpenWRT's Unified Configuration Interface (UCI) as part of a Yocto build?
- how to run 2 command lines in a sames instance of a console program in Vb6?
- Python-chess open UCI engine permission error denied
- How to import a whole folder of CSVs in python (pandas) from UCI ML Repo?
- How to use InvalidPluginExecutionException in UCI
- Dataframes from .data, .names and .test files using pandas
- use chess.uci to change stockfish skill level
- Is there a way to see blunders, mistakes, missed checkmates in Stockfish
- utilize UCI_LimitStrength option in stockfish
Related Questions in FEN
- Wrong FEN evaluation with stockfish
- Cumulative application of a gsub sequence in R
- Is there a way to see blunders, mistakes, missed checkmates in Stockfish
- how to modify a fen string in java?
- Failed chess FEN creation
- Stockfish giving contradictory results on perft funtion
- How can I improve my Haskell code and make it work?
- generating FEN string from reed sensor chess board and only getting next best move from stockfish engine
- How to get a string of the FEN position
- Removing a String from an Array, but adding the Number amount back in Javascript
- FEN Loader to Position giving off numbers
- How do i get the played move by comparing two different fens?
- How to generate a FEN-string and send it to Stockfish?
- Translating FEN strings to chess peices with dynamic chess board divs
- Generate Chess Board Diagram from an array of positions in Python?
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?
I am not sure what you have done or in what programming language, but since you are using the Eclipse IDE, I'm suggesting it is Java.
A hot tips for making the Stockfish to work is by looking at this video: https://www.youtube.com/watch?list=PLQV5mozTHmacMeRzJCW_8K3qw2miYqd0c&v=vuvTFNreykk
The Stackoverflow linked in the video: Using the Universal Chess Interface
So to tackle your question:
Well, the simple solution would be to look for already implemented projects making FEN-strings. I know there are a lot of them. If you want a simple, yet clumsy way of making a FEN-string in Java I made you this:
Note: This implementation believes that you have your entire board in a String[][] (I didn't make the trouble making it more advanced at these late hours)
Note 2: It does not make the entire FEN-string. It is missing the Active color, Castling availability, En passant, Halfmove clock and the Fullmove number, but I'm sure you will be able to implement that easily
Output: