It is currently 16 Apr 2024, 11:47
   
Text Size

MTG Engine compare

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Re: MTG Engine compare

Postby frwololo » 17 Dec 2009, 02:27

Marek14 wrote:If I understand it correctly, one way would be to have an evaluation function that would assign a number to a game state, and then lookahead that tries to maximize that number. Two basic problems are how to construct the function, and how to search the state space in game with incomplete information and random moves like shuffling.
The issue is not "how to search the state space in game with incomplete information and random moves like shuffling.". Technically, the AI could cheat since the "random" effect of shuffling is actually pseudo random and can be foreseen by the computer. The same goes for incomplete information.
But even assuming you take those into accounts (if you don't want the AI to "cheat"), the current major issue for a game such as magic is computing power. I haven't followed deckbot in a while, but last time I checked it was quite slow on a powerful computer. The AI was quite good though, so I'm guessing computing power is just an issue for me and my "333MHz + 20MB Ram" system :mrgreen:
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: MTG Engine compare

Postby Marek14 » 17 Dec 2009, 07:55

frwololo wrote:
Marek14 wrote:If I understand it correctly, one way would be to have an evaluation function that would assign a number to a game state, and then lookahead that tries to maximize that number. Two basic problems are how to construct the function, and how to search the state space in game with incomplete information and random moves like shuffling.
The issue is not "how to search the state space in game with incomplete information and random moves like shuffling.". Technically, the AI could cheat since the "random" effect of shuffling is actually pseudo random and can be foreseen by the computer. The same goes for incomplete information.
But even assuming you take those into accounts (if you don't want the AI to "cheat"), the current major issue for a game such as magic is computing power. I haven't followed deckbot in a while, but last time I checked it was quite slow on a powerful computer. The AI was quite good though, so I'm guessing computing power is just an issue for me and my "333MHz + 20MB Ram" system :mrgreen:
Recently, I reduced the thinking time on Botarena to a minimum (15 seconds) to get it to play faster. It still doesn't play too badly.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: MTG Engine compare

Postby FranAvalon » 17 Dec 2009, 09:31

Deckbot demands a lot of CPU power. In theory, as more powerfull cpu, better results will be optained and the AI will play better. Of course, you can you offset the power of the CPU for more processing time, but when you reaches more than 1 min of thinking time, that can be annoing.

... and IMHO your system is a bit slow ;) :mrgreen:
FranAvalon
Programmer
 
Posts: 568
Joined: 02 Jul 2008, 06:54
Has thanked: 44 times
Been thanked: 64 times

Re: MTG Engine compare

Postby nantuko84 » 17 Dec 2009, 10:13

btw, in real life a player continue thinking on opponent's turn
nantuko84
DEVELOPER
 
Posts: 266
Joined: 08 Feb 2009, 21:14
Has thanked: 2 times
Been thanked: 9 times

Re: MTG Engine compare

Postby FranAvalon » 17 Dec 2009, 10:39

But for AI, the scenario changes every time that the player plays a land/spell/activates an ability. Some are small changes, but other are drastic ones, and all calculus done by AI before the big change is useless
FranAvalon
Programmer
 
Posts: 568
Joined: 02 Jul 2008, 06:54
Has thanked: 44 times
Been thanked: 64 times

Re: MTG Engine compare

Postby frwololo » 17 Dec 2009, 13:01

FranAvalon wrote:... and IMHO your system is a bit slow ;) :mrgreen:
Yeah, hopefully the next generations of portable game devices will have much more power :)
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: MTG Engine compare

Postby FranAvalon » 17 Dec 2009, 14:45

I think so too :)
FranAvalon
Programmer
 
Posts: 568
Joined: 02 Jul 2008, 06:54
Has thanked: 44 times
Been thanked: 64 times

Re: MTG Engine compare

Postby telengard » 17 Dec 2009, 21:37

FranAvalon wrote:But for AI, the scenario changes every time that the player plays a land/spell/activates an ability. Some are small changes, but other are drastic ones, and all calculus done by AI before the big change is useless
Any background AI evaluation should be useful to some degree unless the action chosen hasn't been evaluated yet (in which case it's the same as not have done the background eval). There are exceptions though which I can see happening.

I plan on using background AI evaluation (to only a few plys) for ordering actions for optimal pruning. We'll see how well that works. :)

~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
User avatar
telengard
DEVELOPER
 
Posts: 379
Joined: 23 May 2009, 23:04
Has thanked: 2 times
Been thanked: 27 times

Re: MTG Engine compare

Postby silly freak » 19 Dec 2009, 00:40

i think wizards has done a great job with Duels of the Playneswalkers - at least with the article talking about the background. They actually do AI asynchronously with an undo system, and synchronize every time the human player does a move (or ply if you prefer).

this looks like a great concept to me, it's the one i'm also following. you might like to look at my blog^^

@marek, about intelligence being a "special effect":

this is a great topic, and I like the analogy with turing machines (machines able to do any computation) and Conway's game of life (GoL). GoL is a cellular automaton with a rectangular grid where succeeding generations are calculated from the former ones, so it's fully predictable. However, with a grid big enough and the right pattern, it's possible to create a turing machine, so why not AI? Imagine this gigantic grid of cells "thinking" about its creator... YOU!

honestly, i think "artificial" doesn't fit. i don't think the brain is more "naturally" intelligent that anything we can build. intelligence is a property that can be achieved regardless of the medium, just like turing completeness*

*this is not a wikipedia link or something but a genious web comic
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: MTG Engine compare

Postby Marek14 » 19 Dec 2009, 08:10

silly freak wrote:i think wizards has done a great job with Duels of the Playneswalkers - at least with the article talking about the background. They actually do AI asynchronously with an undo system, and synchronize every time the human player does a move (or ply if you prefer).

this looks like a great concept to me, it's the one i'm also following. you might like to look at my blog^^

@marek, about intelligence being a "special effect":

this is a great topic, and I like the analogy with turing machines (machines able to do any computation) and Conway's game of life (GoL). GoL is a cellular automaton with a rectangular grid where succeeding generations are calculated from the former ones, so it's fully predictable. However, with a grid big enough and the right pattern, it's possible to create a turing machine, so why not AI? Imagine this gigantic grid of cells "thinking" about its creator... YOU!

honestly, i think "artificial" doesn't fit. i don't think the brain is more "naturally" intelligent that anything we can build. intelligence is a property that can be achieved regardless of the medium, just like turing completeness*

*this is not a wikipedia link or something but a genious web comic
The fun thing about Game of Life is that it is deterministic, but NOT predictable!

There is no general algorithm that can tell you the future state of arbitrary configuration - except for playing the game and finding out!

As for AI, think of it like this:

It took about 1-2 billion years before life appeared on this planet.
It took about 4.5 billion years before intelligence appeared.

The first computer was built less than one hundred years ago.
We already have artificial life programs, albeit primitive - but it took much less than one billion years.

Life has a tremendous head start, so it's not really fair holding things that were not achieved by computers yet against them :) We'll get there, eventually.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: MTG Engine compare

Postby frwololo » 21 Dec 2009, 01:37

Image

However computer programs are always built for a purpose, which is not the case of living beings. We yet have to see a computer doing something because it's fun, or beautiful. Or because it's pissed:

The day you see an AI opponent, out of rage, throws its pint of beer at your face because you deckmilled it for the hundredth time, we can talk about intelligence.
but this will never happen because there is no industrial application for a machine with feelings, so close to no research on the subject is done.
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: MTG Engine compare

Postby Chris H. » 21 Dec 2009, 02:14

If only Forge's AI was this tough and mean. :lol:
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: MTG Engine compare

Postby Huggybaby » 21 Dec 2009, 04:11

Don't confuse emotion and intelligence. I think it's easier to simulate emotion than intelligence, and that mirrors real life too. Emotion comes from the primitive part of the brain.
User avatar
Huggybaby
Administrator
 
Posts: 3205
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 696 times
Been thanked: 594 times

Re: MTG Engine compare

Postby Marek14 » 21 Dec 2009, 08:21

Huggybaby wrote:Don't confuse emotion and intelligence. I think it's easier to simulate emotion than intelligence, and that mirrors real life too. Emotion comes from the primitive part of the brain.
Exactly. There are two basic ways of achieving AI.

First is simulation - you know the inputs and outputs of real intelligence, and you try to make a machine which will give the same outputs to the same inputs. You don't care if the internal organization of machine is the same as the internal organization of intelligence.

Second way is emulation - you emulate the basic processes in brain, and hope that you get something which will behave in an intelligent way.

The first way has historically failed because it turns out you'd need an ENORMOUS amount of rules. The second way, on the other hand, requires an enormous computational capacity, but it's much easier to program - you only need low-level units, which is comparatively easy, and you trust the laws of emergence and complexity to do the rest.

The problem with emotions is that right now normal people want computer to do what they tell it to do. But who knows - in ten years, you might have, next to your mouse, an USB-connected piece of fur you can stroke when the computer does something you like, and make it purr :)

Personally, I think that the emotionless machines of the sci-fi are terrible PR. Can you imagine that one hundred years from now, robots might campaign to ban Terminator movies for supporting racism?
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: MTG Engine compare

Postby mtgrares » 30 Dec 2009, 18:21

AI is just an illusion like special effects in a movie. AIs are very fragile.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

PreviousNext

Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 12 guests

cron

Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 12 guests

Login Form