It is currently 03 Jul 2022, 20:22
Text Size

New AI - Thoughts - again - but getting somewhere - slowly

Moderators: Malban, CCGHQ Admins

New AI - Thoughts - again - but getting somewhere - slowly

Postby Malban » 31 Mar 2011, 14:30

New AI - Thoughts - again - but getting somewhere - slowly


This is ONE situation at any state that a game can be in.
- It can be created from a real match
- it can be cloned from a virtual match
- it can be changed by AIActions

Actions on a VirtualMatchSituation must not influence the "real" match in any way!

The virtual match will be built from the "real cards" of the match.
All battles/sorceries/abilities and effects will not be operated by the scripting of the cards but will
be done according to the hintsystem.
If hints are implemented correctly nearly all things that are scripted will be simulated by the match.
This is way more efficient than doing all the scripts (and the scripts dont know about a VirtualMatch :-)).

If future goes as planned - both the hints and the "JavaScipting" will be generated from the CardText
(to a certain degree) so both should be in harmony anyway.

This certainly looks strange from the outside - like implementing the whole game twice - once as simulation and
once for real. But all this goes in the spirit of the "match" not knowing whether a player is "real" or AI".
The JPortal game and the "playing AI" are totally independent of each other and I would like to leave it
that way :-).

If ever any of the other MTG Games have an output of a MatchSituation, you might possibly input that to JPortal hand
have it weighted :-).

Are Actions a (AI) player can do. One AIAction describes all that is needed to complete one player activity.
It includes all that is needed to play (e.g.) one card
a) decide what card
b) pay mana
c) point to lands that are used to generate mana
d) get target(s) if neccessary for action

Types of actions can be:

AIActions can be "executed" on a virtual match situation - or can be "saved" as an action an AI may do on
a real match.

All AIActions an AI may have for one phase are collected in an AIPlan.
All AIPlans for one Round are collected in an AISchedule.

Every VirtualMatchSituation can be weighted twofold.
Each such situation has a Weighting - "Score" from the view of each of the players.

Enhanced "AI class"
Will generate AISchedules and the final weighting score for the current phase will be taken as the
AIActions that will be losened on the real game.
Upon each turn, the current schedule will be weight anew upon each single turn to consider situation difference between the
expected and the real situation - the other player might actually realy had done something.

Due to the nature of a game like MTG there are multidues (in the real sense of the word) possible Action paths for one single
game situtaion to take that might lead to a "good" outcome.

In order to "conquer" these multitudes the possile paths to take will be influenced by factors:

a) (possibly an ) intelligence setting
b) current overall game situation (if player has low health - look rather for healing, than an hurrican...)
c) strategy settings (agressive / wizard / barbarian.... e.g.)

This settings/factors must be so efficiently evaluated, that the computation of AI-Turns can be done in an acceptable timeframe.

Included in the score must be all relevant parameters.
a) health
b) power/toughtness/ count of ceratures artifacrs / enchantments
c) possible outcome of attack / block
d) lands / played and unplayed
c) library size

Scoring is crucial - and not implemented yet :-)
Homepage of JPortal:
Posts: 84
Joined: 26 Apr 2010, 14:11
Has thanked: 0 time
Been thanked: 12 times

Re: New AI - Thoughts - again - but getting somewhere - slow

Postby Huggybaby » 18 Apr 2011, 02:23

Malban wrote:If ever any of the other MTG Games have an output of a MatchSituation, you might possibly input that to JPortal
One of these days. My $100 offer is still out there. :)
User avatar
Posts: 3165
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 661 times
Been thanked: 582 times

Return to JPortal Documentation

Who is online

Users browsing this forum: No registered users and 2 guests

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 1922 on 07 Jun 2021, 06:01

Users browsing this forum: No registered users and 2 guests

Login Form