Success: remaking the Trade AI

PureSim Baseball is the ultimate baseball fan's toy, with support for both casual and hardcore baseball fans.

Moderator: puresimmer

SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

That would be a coding issue.  Not possible to get AI vs AI multi-trading via the xml.
Amaroq
Posts: 807
Joined: Wed Aug 03, 2005 5:29 pm
Location: San Diego, California

RE: Success: remaking the Trade AI

Post by Amaroq »

Hmm, I worry about the direction of that change, Sitting Duck. I can certainly understand why you're going that way, but I always felt that the AI undervalued defense as a consideration, with the default values - it feels like one spot I gain a significant advantage (watching PBP) is on the 'great play' and 'he really should have gotten to that' results. Reducing it to 0 consideration would exacerbate that - I think this is really a code issue.

For fielding, honestly, each position should have its own weighting: catchers might be 0.2 hands, 0.3 range, and 2.0 arm, for example, while a shortstop might be all about hands and range, with arm as a lesser consideration, and a first baseman might have 0 for arm.

So, again, one for Shaun to look at, I think.
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

I understand your point fully.  Unfortunately, it really is the only way to keep relative value in line at this stage of the code.  As you might see, look at McCovey and his fielding ratings.  Then pick any pitcher.  Pick 3-4 pitchers and look how their fielding ratings are equivalent or better than a position player's.  Thus you get a totally overinflated pitcher value.  If you drop the pitching-exclusive ratings, then of course there is no sense to any of it.  *sigh*

I do agree fully with your concept of each position having unique weights for various things.  I think this could go a long way towards straightening things out somewhat.  And I do agree it is an alarming change, but if anything, it highlights the issue itself.  And I guess that is a good thing in the long run, if something is done about it.
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

Regardless of what can be done in weighting the current available rating weights, if we don't get potential into the equation, the whole thing is screwy.  I have a team willing to trade me Joe Morgan for decent players (they are asking for).  Decent but not great.  Morgan still hasn't developed fully.  So his potential isn't really affecting it as it should.

Another argument for including potential in the equation.  Just bumping for Shaun's attention (when he gets back from wherever).
verizon32
Posts: 168
Joined: Tue May 23, 2006 1:36 am

RE: Success: remaking the Trade AI

Post by verizon32 »

Does AI trade evaluation consider stats too?
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

yes
Amaroq
Posts: 807
Joined: Wed Aug 03, 2005 5:29 pm
Location: San Diego, California

RE: Success: remaking the Trade AI

Post by Amaroq »

ORIGINAL: SittingDuck
Regardless of what can be done in weighting the current available rating weights, if we don't get potential into the equation, the whole thing is screwy. I have a team willing to trade me Joe Morgan for decent players (they are asking for). Decent but not great. Morgan still hasn't developed fully. So his potential isn't really affecting it as it should.

Another argument for including potential in the equation. Just bumping for Shaun's attention (when he gets back from wherever).
Eye and Velocity, too.

Potential should probably be an inverse function of age. If two players were otherwise identical, I'd want a way to rate the 18 year old higher than the 20 year old - more time to improve before his peak - and to rate the 32 year old higher than the 36 year old - more time before he decays.

I still haven't decided, personally, which is better, an 18-year-old with 60 potential or a 20-year-old with 70 potential (if their other stats are the same), but I have no idea how to tweak this section of the XML to weight one higher than the other.
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

I like how you think, Am.  We're on the same page.  I was thinking that making EYE a weighted rating would help differentiate batters a bit more than pitchers, although again, pitchers have a rating in EYE (but it is usually about 10-15 on a 1-100 scale - so no big deal).

Yes, I definitely think the age and potential need to work in conjunction here, more than any other rating.  YouthHitter/Pitcher in and of itself does not do enough.

I've been working on some more weightings to further devalue relievers a bit, but also ran a several season sim while at work.  I want to check to see if teams are still relief-happy when it comes to trade targets.  Part of this could be the problem of historical leagues and Lahman imports - maybe not enough relievers to satisfy the teams.  I'm not sure.

I am sure of one thing - we need Shaun in here soon to start commenting on stuff.  This type of disconnect is very unlike him.
puresimmer
Posts: 2117
Joined: Sun Jul 24, 2005 3:39 pm
Contact:

RE: Success: remaking the Trade AI

Post by puresimmer »

I'm here guys. Just dealing with some issues on the "real job / life" side of things.

You guys are pretty spoiled you know :)
Developer, PureSim Baseball
puresimmer
Posts: 2117
Joined: Sun Jul 24, 2005 3:39 pm
Contact:

RE: Success: remaking the Trade AI

Post by puresimmer »

ORIGINAL: SittingDuck

No, haven't heard from him.

OK, here's the deal:

Because the trade evaluation considers speed, arm, range and hands, this means that both position players AND pitchers are getting values accrued from their ratings. What is bad about that is that pitchers are getting ratings for the fielding stuff, which inflates their value. This is not what we want. We'd really like to have position players only get rated for speed and fielding stuff, but currently the code won't permit it.


No, the AI does *not* look at fielding for pitchers at all (though I know this is not clear in the XML) Think of the XML as a mechanism to influence weighting of internal algorithms in PureSim, in many cases the core algorithms are much more complex, I just try to expose as many heuristics as possible.



Developer, PureSim Baseball
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

heuristics??  whew, there's a word (googling...)

Great, thanks for that feedback, Shaun.  We still feel potential is a good thing to add in there.
User avatar
PadresFan104
Posts: 1147
Joined: Mon Aug 08, 2005 3:29 am
Contact:

RE: Success: remaking the Trade AI

Post by PadresFan104 »

ORIGINAL: puresimmer

I'm here guys. Just dealing with some issues on the "real job / life" side of things.

You guys are pretty spoiled you know :)

Yes, we certainly are, but so are you Shaun. Maybe not by overall sales, but by the overall community. You won't finder a nicer or more understanding user base anywhere on the 'net. [;)]

Thanks for taking the time to jump into so many threads tonight! We appreciate it!
PadresFan's Text Sim Mod Website: http://www.padresfanmods.net
Follow Me On Twitter: http://twitter.com/padresfanmods
Abev
Posts: 228
Joined: Thu Aug 11, 2005 1:06 pm
Contact:

RE: Success: remaking the Trade AI

Post by Abev »

SittingDuck : From what you have changed for the trade AI, I want to change it so When teams are determined to be "out of it", that they really put a value on trading away their established players for young players with high potential. Is this possible ?
Amaroq
Posts: 807
Joined: Wed Aug 03, 2005 5:29 pm
Location: San Diego, California

RE: Success: remaking the Trade AI

Post by Amaroq »

Abev - it totally should be.

You would want to look at IN_SEASON_EVAL_WT_4, and IN_SEASON_EVAL_WT_6, which are 'get younger' and 'dump salary', respectively. I suspect you'd want fairly low values for the normal things - Contact, Power, Stuff, Control - and fairly high values for the 'youth and potential' items: "YouthHitter" and "Youth" (pitcher) respectively.
ORIGINAL: SittingDuck
<IN_SEASON_EVAL_WT_1 Contact="6" Power="7" YouthHitter="1" Speed="0" Arm="0" Range="0" Hands="0" Salary="2.5" Stuff="6" Control="3" Youth="1" Endurance="2"/>

<IN_SEASON_EVAL_WT_2 Contact="6" Power="7" YouthHitter="2" Speed="0" Arm="0" Range="0" Hands="0" Salary="2" Stuff="6" Control="3" Youth="2" Endurance="2"/>

<IN_SEASON_EVAL_WT_3 Contact="6" Power="7" YouthHitter="3" Speed="0" Arm="0" Range="0" Hands="0" Salary="1" Stuff="6" Control="3" Youth="3" Endurance="2"/>

<IN_SEASON_EVAL_WT_4 Contact="5" Power="6" YouthHitter="5" Speed="0" Arm="0" Range="0" Hands="0" Salary=".5" Stuff="5" Control="1" Youth="5" Endurance="3"/>

<IN_SEASON_EVAL_WT_5 Contact="6" Power="8" YouthHitter="0" Speed="0" Arm="0" Range="0" Hands="0" Salary=".5" Stuff="7" Control="3" Youth="0" Endurance="3"/>

<IN_SEASON_EVAL_WT_6 Contact="3" Power="3" YouthHitter="2" Speed="0" Arm="0" Range="0" Hands="0" Salary="-1" Stuff="3" Control="1" Youth="2" Endurance="2"/>
Abev
Posts: 228
Joined: Thu Aug 11, 2005 1:06 pm
Contact:

RE: Success: remaking the Trade AI

Post by Abev »

thanks amaroq

Ive been looking and I dont even have an entry for "IN_SEASON_EVAL_WT_6". I wonder if I deleted it at some point?

Can I influence the disposition of the the GM's? 22 out of 24 teams on July 31 are "not looking".
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

No, you didn't. I'll explain in a bit.

EDIT: the code was originally written (I believe) with six categories. You'll see this when you look above at the explanations for what each lookup table number corresponds with. There you'll see six different 'modes'.

It looks as if Shaun backed off and made both 'not actively interested' and 'minor changes' into the same lookup table. I just re-expanded it back to six tables so that there was a bit of a difference between 'not actively interested' and 'minor changes'.

That said, I've been working a lot with some changed variables. I believe the salary variables need to be set to ONE for most, except the 'dump salary'. But I am not even sure that mode even works. I've tested it by cutting a team down to pennies left in their team funds about a month before the deadline and none of them queue up as 'dumping salary'. I've also tested it by making them over-the-limit on salary. Still nothing.

So I don't see 'pennant drive' nor 'dump salary'. I am not even sure these are valid, to be honest. Which is why I asked previously as to whether anyone has seen the pennant drive mode. I remember it from PS2003, but haven't seen it in this version.
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

My latest tweaks to the talent/trade evaluation parameters. I find salary not to be an issue if it is given a factor other than zero (zero can really screw things up, like the Gibson for a Scrub debacle).

This assumes you know what yer doin' wit the XML and have installed the following section first (posted in blue):

<EVAL_GM_STATE_LOOKUP RangeMin="1" RangeMax="1">IN_SEASON_EVAL_WT_1</EVAL_GM_STATE_LOOKUP>
- <!-- gmsGetBetter1
-->
<EVAL_GM_STATE_LOOKUP RangeMin="2" RangeMax="2">IN_SEASON_EVAL_WT_2</EVAL_GM_STATE_LOOKUP>
- <!-- gmsGetBetter2
-->
<EVAL_GM_STATE_LOOKUP RangeMin="3" RangeMax="3">IN_SEASON_EVAL_WT_3</EVAL_GM_STATE_LOOKUP>
- <!-- gmsGetYounger
-->
<EVAL_GM_STATE_LOOKUP RangeMin="4" RangeMax="4">IN_SEASON_EVAL_WT_4</EVAL_GM_STATE_LOOKUP>
- <!-- gmsPennantDrive
-->
<EVAL_GM_STATE_LOOKUP RangeMin="5" RangeMax="5">IN_SEASON_EVAL_WT_5</EVAL_GM_STATE_LOOKUP>
- <!-- gmsDumpSalary
-->
<EVAL_GM_STATE_LOOKUP RangeMin="6" RangeMax="6">IN_SEASON_EVAL_WT_6</EVAL_GM_STATE_LOOKUP>



On with the changes:

<IN_SEASON_EVAL_WT_1 Contact="6" Power="9" YouthHitter="1" Speed="2" Arm="2" Range="3" Hands="2" Salary="1" Stuff="7" Control="3" Youth="1" Endurance="3" />
<IN_SEASON_EVAL_WT_2 Contact="6" Power="9" YouthHitter="2" Speed="2" Arm="2" Range="3" Hands="2" Salary="1" Stuff="7" Control="3" Youth="2" Endurance="3" />
<IN_SEASON_EVAL_WT_3 Contact="6" Power="9" YouthHitter="4" Speed="2" Arm="2" Range="3" Hands="2" Salary="1" Stuff="7" Control="3" Youth="4" Endurance="3" />
<IN_SEASON_EVAL_WT_4 Contact="6" Power="9" YouthHitter="8" Speed="2" Arm="2" Range="3" Hands="2" Salary="1" Stuff="4" Control="1.5" Youth="8" Endurance="3" />
<IN_SEASON_EVAL_WT_5 Contact="8" Power="11" YouthHitter="0" Speed="4" Arm="2" Range="3" Hands="2" Salary="1" Stuff="9" Control="5" Youth="0" Endurance="4" />
<IN_SEASON_EVAL_WT_6 Contact="4" Power="6" YouthHitter="4" Speed="1" Arm="1" Range="2" Hands="1" Salary="-1" Stuff="4" Control="2" Youth="4" Endurance="2" />



<END_OF_SEASON_WEIGHTS Contact="6" Power="9" YouthHitter="2" Speed="2" Arm="2" Range="3" Hands="2" Stuff="9" Control="3" Youth="2" />


<TALENT_RATINGS_CONSIDERATION>.50</TALENT_RATINGS_CONSIDERATION>
<TALENT_DYNAMIC_CONSIDERATION>1</TALENT_DYNAMIC_CONSIDERATION>
Amaroq
Posts: 807
Joined: Wed Aug 03, 2005 5:29 pm
Location: San Diego, California

RE: Success: remaking the Trade AI

Post by Amaroq »

What impact does this have on 'Eye' and 'Velocity' as weights into the formula?

It's always struck me as odd that they weren't represented in this line. Can you 'edit' two players to be identical, save one with significantly better Eye than the other, and see if a small change to, say, Power, overrides a large change in Eye? Or worse, if a few points of Arm for a first baseman overrides a few points of Eye?
wlfcards
Posts: 61
Joined: Tue Jul 11, 2006 10:41 pm

RE: Success: remaking the Trade AI

Post by wlfcards »

I don't know if this is a part of the AI or XML -&nbsp; The computer should not give up a starter (pitcher or hitter) for a player who would be a reserve.
SittingDuck
Posts: 1186
Joined: Sat Aug 31, 2002 9:08 pm

RE: Success: remaking the Trade AI

Post by SittingDuck »

Something I've been considering is if the following affects trade talent evaluation in a particular way:

Ratings consideration &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
Used to determine how much the AI will consider ratings over actual performance when evaluating talent

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <TALENT_RATINGS_CONSIDERATION>.45</TALENT_RATINGS_CONSIDERATION>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Like above except influences how much actual simulated performance is considered in relation to ratings
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <TALENT_DYNAMIC_CONSIDERATION>1.30</TALENT_DYNAMIC_CONSIDERATION>

These are default values.&nbsp; Which are probably fine once a player has accrued a significant amount of stats or playing time.&nbsp; However, I am wondering if these values might not distort the value of a young player, or in the case of historical league, the value of players in the first few years of the league (before stats can mount with time).

Thus, this might help explain a good bit of the poor trading AI as a superstar who might be off to a poor year in his first year gets traded for a journeyman pitcher who is having a decent year (and remember that most pitchers have over-the-top import ratings, which I still think need adjustment).
Post Reply

Return to “PureSim Baseball”