Download

How hard would it be to make a chess game that you decide what each piece does

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.
Each round.
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.

1 Like

That made me laugh!