Ive never made a chess ai before. what im wondering is can I make an ai that is modular, and run a chess algotithim depending on what the user says the rules should be? would it be just as easy as making a normal chess AI, or would that be insanely difficult?
Well a chess ai is Deep Blue stuff so yea would be insanely difficult to build one that would give a chess master a run for their money. Even harder is Go
A modular approach is a good idea though and the future for Unreal 5 is components
This doesn’t sound like the work would be based on the engine, but on the design of the AI. If you come up with the algorithms needed, I don’t think engine matters, just implementation at that point. Maybe try a simpler AI approach for something turn-based as a learning step before Chess. I also just searched and I’ve found plenty of scholarly articles on Chess and turn-based AI so the resources are out there.
This would be much harder than making GO ai. You want general AI that can play any chess like board game. Not sure if anybody has idea how to program such AI yet, well maybe somewhere deep in china or places like DARPA they know where to start.
And i do not think you can make such AI modular.
For eg. lets say user changes that king can move like queen.
How do you make check-mate ?
How you teach AI that totally new game after just one rule changed.
What are you even talking about?
Chess games with AIs that made Gary Kasparov think twice have existed for 3 or 4 decades.
Deep Blue was probably 20 years before you were even born I bet.
It’s not impossible, or hard.
How good the AI actually is - that is what is hard.
You have to posit that the AI has a specific end game for each move.
To be able to have an endgame from opening you either need to compute a lot, far beyond what is currently possible, or you need to lock in to a single end game.
Since pretty much all games have a specific defense, your AI will likely fail as soon as a defense against the end game in use by the AI is enacted by the player.
To make the AI have a specific end game in mind with randomly changing rules - that’s also near impossible.
What you can do.
Calculate the least amount of moves to a check mate.
That’s what most chess AIs do currently. Would not even call them AI. They are more just scripts.
Chess is a finite game after all. Even with all it’s new variations…
Yeah, I was thinking of doing that. I didn’t think it’d be very time efficient, especially since I’m a noob still (been only 6 months). This is for a future project though, maybe 6 months in the future when I’ll be done with the game I’m working on.
Unless you find a list of moves / games in a pre-made format to use its going to be time consuming regardless.
If you want to make a silly AI that doesn’t care about winning but aims to keep the king from being taken, it may be a lot easier.
Simply because it is reactive rather than active.
You would still need to make the AI think 3 or more moves ahead instead of reacting directly. But it’s overall easier…
For me this means any “chess” game with any rules, so any game that can be played on chess board.
Normal chess, yes it is matter of finding some github repo downloading it and making unreal plugin out of it.
However making AI that can play any set of rules on chessboard is kind of creating General AI.
That made me laugh!
The basic principles of applied logic is the same as to the necessary requirements to make the AI function regardless of the rules of the game in which a strategy is being applied. The documentary does points out the requirements, in story form, no matter the game that the AI is asked to play.
In simple terms you need a resource necessary to generate the data base as to possible moves as to the rules that limits the AI is allowed to make. Want the AI to play a different game? Replace the database and rule sets.
The AI in this configuration can only make move decisions, as to outputting the moves, as to decisions made by the logic engine as to what would be considered a possible winning move. In a way the AI stands in for the missing player.
The logic engine on the other hand is what makes the wheels on the bus go round and round as “the” subsystem using, in most cases, fuzzy logic, an approach to computing based on “degrees of truth” rather than the usual “true or false” (1 or 0) Boolean logic based on simple rule sets with out the intent the purpose is to win the game.
Does this answer the OP question I don’t know as the question is with out context in scope as to making a chess game where all things relating to AI is via the use of a logic engine no mater the required output as all that is necessary is a rule set and database as to allowed moves be it chess,GO,smart cars, autonomous aircraft,or smart bombs.
So the AI part not so hard and EU4 has the tools to get that far but a logic engine would be difficult and a logic engine that can think for it’s self would be insanely difficult (Sknet stuff)