[WIP] Artificial Intelligence Personalities
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
24 posts
• Page 2 of 2 • 1, 2
Re: [WIP] Artificial Intelligence Personalities
by myk » 14 Mar 2013, 16:37
+1. this keeps things clean and accessible only from where it makes sense.Max mtg wrote:aiPlayer.getAi().getProperty(AIProps.AI_MULLIGAN_THRESHOLD)
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: [WIP] Artificial Intelligence Personalities
by Agetian » 14 Mar 2013, 17:14
@ Max Mtg, myk: Agreed. Will improve according to suggestions.
Thanks!
EDIT: Done.
- Agetian

EDIT: Done.
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: [WIP] Artificial Intelligence Personalities
by myk » 17 Mar 2013, 07:09
Hey Agetian, I tested the merge from trunk to AIPersonalities, and there aren't any special conflicts with your branch. The same upgrade procedure as trunk applies, though. Would you like me to check in the merge? If you're in the middle of developing something, it would be better if you got that checked in before trunk is merged to the branch.
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: [WIP] Artificial Intelligence Personalities
by Agetian » 18 Mar 2013, 04:02
@ myk: Yep I had no problems merging with the latest trunk after you've reintegrated your branch. Thanks for the offer to help! I think everything is good so far!
A question for everyone: I've hit another "busy at work" period of time in my life, hopefully not a long one, but potentially I won't be able to develop too actively for a week or two - that being said, the API itself for the AI personalities is fully in place and it's working correctly as far as all my tests have shown. It doesn't do much yet (there's only one property - the mulligan threshold - and no actual stock profiles yet) but the API is usable and can be used by anyone to add new properties (I certainly have lots of ideas and will jump in with them as soon as only possible, but it may have to wait for a while). That being said, what do you think - would you like me to reintegrate the branch into trunk then and then just continue developing there (because for the most part, it's just new properties from here on out, plus linking to the quest metadata if necessary) or continue working in my own branch for the time being and just keep merging until I get a chance to get back to it? I'll do as you say, I think both scenarios are possible.
- Agetian
A question for everyone: I've hit another "busy at work" period of time in my life, hopefully not a long one, but potentially I won't be able to develop too actively for a week or two - that being said, the API itself for the AI personalities is fully in place and it's working correctly as far as all my tests have shown. It doesn't do much yet (there's only one property - the mulligan threshold - and no actual stock profiles yet) but the API is usable and can be used by anyone to add new properties (I certainly have lots of ideas and will jump in with them as soon as only possible, but it may have to wait for a while). That being said, what do you think - would you like me to reintegrate the branch into trunk then and then just continue developing there (because for the most part, it's just new properties from here on out, plus linking to the quest metadata if necessary) or continue working in my own branch for the time being and just keep merging until I get a chance to get back to it? I'll do as you say, I think both scenarios are possible.
- Agetian
Last edited by Agetian on 18 Mar 2013, 05:45, edited 1 time in total.
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: [WIP] Artificial Intelligence Personalities
by myk » 18 Mar 2013, 05:33
I think letting a branch go unused for a while is a good way to lose the work in it. If merge conflicts build up, it will hamper your ability to get back into its development. Since the "experimental" phase of the branch has passed and you have it tested, I'd vote for merging it now and expanding it later.
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: [WIP] Artificial Intelligence Personalities
by Sloth » 18 Mar 2013, 21:10
Yes, please merge.Agetian wrote:A question for everyone: ... what do you think - would you like me to reintegrate the branch into trunk...
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: [WIP] Artificial Intelligence Personalities
by Chris H. » 18 Mar 2013, 21:46
I too think that merging the branch back into the trunk would be a good idea.
-
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: [WIP] Artificial Intelligence Personalities
by Agetian » 19 Mar 2013, 02:51
OK, since there were only votes for the reintegration, I've reintegrated the AIPersonalities branch into trunk.
So far:
The primary API for AI personalities is now in place. AI properties are implemented in forge.game.ai.AiProps and are retrieved via a call to one of AiController.getProperty, AiController.getIntProperty, or AiController.getBooleanProperty depending on the type of property. The basic getProperty returns data of type String, getIntProperty returns an int and getBooleanProperty returns a boolean. The AI controller can be retrieved via a getAi() call on the AI player object, so that a certain property AI_MY_PROPERTY can first be implemented in an enum in AiProps (the default value is specified as a string):
For an example implementation of a working AI property (of type int), see AI_MULLIGAN_THRESHOLD implemented in AiProps and retrieved in ComputerUtil.
Currently there is one property only, but more are on the way - I'll get back to coding them as soon as I resolve this business project I have on my hands (and I'll try to code a bit even during these days, too). Everyone is also free to expand as necessary. Specific AI profiles for specific quest opponents will be implemented at a later date.
P.S. If someone knows how to delete a branch on the SVN, please do it, it's safe to remove branches/AIPersonalities.
- Agetian
So far:
The primary API for AI personalities is now in place. AI properties are implemented in forge.game.ai.AiProps and are retrieved via a call to one of AiController.getProperty, AiController.getIntProperty, or AiController.getBooleanProperty depending on the type of property. The basic getProperty returns data of type String, getIntProperty returns an int and getBooleanProperty returns a boolean. The AI controller can be retrieved via a getAi() call on the AI player object, so that a certain property AI_MY_PROPERTY can first be implemented in an enum in AiProps (the default value is specified as a string):
- Code: Select all
AI_MULLIGAN_THRESHOLD("5"),
AI_MY_PROPERTY("false")
- Code: Select all
boolean myAiProp = aiPlayer.getAi().getBooleanProperty(AiProps.AI_MY_PROPERTY);
For an example implementation of a working AI property (of type int), see AI_MULLIGAN_THRESHOLD implemented in AiProps and retrieved in ComputerUtil.
Currently there is one property only, but more are on the way - I'll get back to coding them as soon as I resolve this business project I have on my hands (and I'll try to code a bit even during these days, too). Everyone is also free to expand as necessary. Specific AI profiles for specific quest opponents will be implemented at a later date.
P.S. If someone knows how to delete a branch on the SVN, please do it, it's safe to remove branches/AIPersonalities.
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: [WIP] Artificial Intelligence Personalities
by myk » 20 Mar 2013, 16:48
branch removed. Thanks for getting this framework started!
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
24 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 62 guests