<< Back to Programming Forum   Search

Posts 1 - 20 of 25   1  2  Next >>   
Chess and Warlight: 4/4/2016 19:56:59


Simi the Lunatic
Level 59
Report
Hi,
Me and my friend were trying to compare the difficulty of programming an AI in the game of chess and the difficulty of programming an AI in Warlight. In the same order of ideas, we were talking which game have the most possibilities in it. I would like to hear you guys on this subject.

Thanks
Chess and Warlight: 4/4/2016 20:05:57


Noobster11
Level 58
Report
I would assume warlight is much more difficult to program an AI for as it is not a perfect information game, however I know virtually nothing about programming or coding so I could be completely wrong.

Edited 4/4/2016 20:06:09
Chess and Warlight: 4/4/2016 20:07:05


Beep Beep I'm A Jeep 
Level 64
Report
Chess is easy when compared to WL
Chess and Warlight: 4/4/2016 20:08:05


Fleecemaster 
Level 59
Report
If you're talking about testing all possible paths (how chess works) then chess is easier.
Chess and Warlight: 4/4/2016 20:12:56


TBest 
Level 60
Report
The main difference comes in the random elements in WL. FOr example fog, luck, move order etc.

Chess is a game where you have complete knowledge all the time. (SO it is solvable.) WL is not solvable in its inherit statues.

A WL game where all luck elements (including fog) were removed may be easier to program then a CHess AI (Depends on map etc. Chess has a fix map after all. AI Games, is the best (read: closest) example when compering WL to Chess)
Other parts can't really be compared since it is diffrent types of math work. Also in WL you have multiple orders each turn, in chess you have one. Making an acceptable chess engine is way easier then a ok WL AI.


TL;DR THe challenge in making a Chess engine is calculating ahead far and accurate. For WL it is calculating the current turn (evaluation statues) that is important. You don't need to make a plan, as you have in Chess, but the evaluating is way more challenging.

@Sultan, a WL AI needs a distence/time caluclator, but that is pretty much it in terms of depth. No such thing as moving a king to avoid a check 10 moves later

Edited 4/5/2016 01:24:43
Chess and Warlight: 4/4/2016 20:14:48


Sułtan Kosmitów
Level 64
Report
Chess AI does not work obviously like this Fleece :)
Chess AI is at least possible to be perfect, while even a very good WL AI (better then all the players) should be able to beat.
So it depends on how good AI you want to get.
Chess AIs can be very complicated though too, since the computing abilities of our PCs are still poor.

@TBest I believe a good AI needs to calculate with some depth in WL.

Edited 4/4/2016 20:22:41
Chess and Warlight: 4/4/2016 20:20:43

Vodyak
Level 56
Report
Yeah if fog is removed and you only calculate the most useful moves like in chess then yeah there are more possiblities, as all chess programs give a calculation depth and evaluation considering the positions and pieces, warlight also could probably be given evaluation of positions but the drawback is that there are so many different kind of maps with that it would be practically impossible to do.

Therefore for any single map(not ridiculously big) the no of turns taken is only 10-25 usually but in chess it's more.

Edited 4/4/2016 20:26:54
Chess and Warlight: 4/4/2016 20:33:43

Vodyak
Level 56
Report
And we have been writing chess programs since the 70s so we expect modern chess engines to be strong and calculate depth and stuff but WL is new so an AI would take some to be perfected(probably)
Chess and Warlight: 4/4/2016 20:43:20


Sułtan Kosmitów
Level 64
Report
WL AI can not be perfect.
Chess and Warlight: 4/4/2016 22:17:47


Sephiroth
Level 61
Report
Chess is deterministic, WL isn't
Chess and Warlight: 4/4/2016 22:29:20


GeneralPE
Level 56
Report
A big problem is the plethora of maps. In chess, you know the board, while in Warlight, it constantly changes. Maybe if you chose one no fog template, it would be easy, but otherwise, chess is a lot easier.
Chess and Warlight: 4/4/2016 22:33:27

M. Poireau 
Level 57
Report
I would imagine the largest challenge with AI design when it comes to Warlight is adjusting to all the different possible maps and settings. You have to play differently on a large map with lots of Airlift cards, and adjust your strategy to play a small map with very powerful Blockade cards, and again for a large map free-for-all with an army cap.

That's what I enjoy about Warlight: trying new ways to play and adjusting your strategy accordingly. AIs are not good at doing that (at least not yet!).

Aside from that, I'd think it would be harder for a HUMAN to become a good chess player, but that doesn't carry over to Artificial Intelligence: for an AI, this is a real challenge.
Chess and Warlight: 4/4/2016 22:34:13

M. Poireau 
Level 57
Report
As another example, just consider how you have to pick territories completely differently in a team game versus a 1v1 versus an FFA...
Chess and Warlight: 4/5/2016 17:23:52


Sułtan Kosmitów
Level 64
Report
Different maps are not a problem at all.
@Seph WL AI algorithms can be deterministic.
Edit: And a problem of a WL pure skill game should be alsomdeterministic

Edited 4/5/2016 17:33:14
Chess and Warlight: 4/5/2016 18:05:34


Norman 
Level 58
Report
Hello

Modern AIs sometimes have some fancy features however classic game playing AIs have two components no matter which problem they solve:

- Strong evaluation function. An evaluation function looks at the current board and assigns a value to it depending on whether the board looks good or bad. Chess beginners already learn a basic evaluation function by counting the pieces on board while different pieces like a pawn or the queen get different multiplicators. To find good evaluatoin functions we should have experts with a very strong domain knowledge. To really fine tune the functions we can use some machine learning techniques. Hereby we try to systematically adjust the weights and if we start to win more games we are on the right path.

- Ability to look deep into the future. Hereby we try out all different moves, then check all possible opponent responses, then all possible own response to the opponent response,... This exploads pretty fast and modern AIs have quite complex optimizations here. However even without any complex optimizations I kinda randomly guess that we should still be able to look midgame maybe 6 steps into the future. The chess AI then picks the most promising path assuming that it's opponent always picks the move that hurts us most and we pick the move that benefits us most.

It should be a very simple task to write a chess AI which plays kinda OK. My mentioned chess AI which looks 6 steps into the future and only uses the piece values for evaluation should already be pretty hard to beat for guys who don't really know what they are doing. If we then add some positional aspects to the evaluation function like us controlling the center we should quite fast get a hard to beat chess AI. In terms of lines of code our small chess AI needs about 10 lines of code for the evaluation function and about 50 lines of code for the minimax. Then we also need a couple hundred standard lines of code responsible for stuff like the game engine communication or the definition of how pieces are allowed to move.

Edited 4/5/2016 18:16:51
Chess and Warlight: 4/5/2016 18:29:42

M. Poireau 
Level 57
Report
I disagree that different maps aren't a problem.

Consider different styles of play on a wide-open map versus one with lots of "corridors". Now add negative bonuses, different settings (Bomb cards, common Blockades, Sanctions..., local deployments), etc, and it adds a lot of complexity to an AI-designer.

How much code would you have to add to an AI so it could effectively play a map like this?

https://www.warlight.net/Map/14287-Obama-Economy

Now, what if it was a multi-attack game?

Edited 4/5/2016 18:29:57
Chess and Warlight: 4/5/2016 20:51:25


Sułtan Kosmitów
Level 64
Report
Nvm, but what Norman said: evaluation function (same on every map) + if we concider maps only then dont add bombs, negative bonuses, LD, etc.

Edited 4/5/2016 20:51:47
Chess and Warlight: 4/17/2016 21:11:03

ARand0mPlayer
Level 61
Report
Even if we would play with no fog and such, giving us a lot of information about our position, we wouldn't be able to write a perfect AI due to the fact that enemies orders are secret while we are making our orders, this is in a different way then in chess. Imagine when your enemy has a double border on one of your bonuses. He will fully deploy and randomly attack one territory, but you can't predict which one and by definition only have a 50% chance to keep your bonus.
Chess and Warlight: 4/17/2016 23:31:33


szeweningen 
Level 60
Report
Warlight is actually solvable in terms of nash equilibrium in mixed strategies, so a "perfect" AI is possible which would never lose >50% of the games in the long run. Programming that though would be quantitatively impossible on most settings, let alone AI that would work like that on all settings.
Chess and Warlight: 4/18/2016 02:28:27


Benjamin628 
Level 60
Report
@Sze, if you are talking about just any game, then that would be wrong, because AI vs AI. But if you mean Human vs AI, it is possible to build a perfect AI, under certain conditions.

Edited 4/18/2016 02:29:19
Posts 1 - 20 of 25   1  2  Next >>