Jump to content
  • Advertisement
Sign in to follow this  

Test Environment Issue

This topic is 3086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I've been trying to learn AI using Programming Game AI by Example, online resources, etc. To help me along, I've set up a weird sort of test environment for the AI. I'll describe the (relevant) part that works:

The AI was originally given ten actions it could select from to perform under a budget of points. Each act had desirability calculated based on a set value reduced by a function of its point cost (and some other irrelevant things right now). Just to make sure the computer wasn't asleep on the job, the acts do not return proportionate amounts of desirability to their cost, and some are completely inverted. This step works fine (the computer really scrapes the bottom of the budget, as intended), no matter the budget of points.

I then had the AI calculate which acts it would perform if each act had to be repeated the same number of times, paying full cost and gaining full reward (desirability) for each repetition, while remaining under or tied with its given points budget for the entire spread. It does this just fine as well.

Now I want the AI to select the X number of repetitions on its own (within the bounds of 5 and a calculated maximum based on budget but capped at 300), returning the combination of acts and repetitions that returns the highest reward while still remaining under budget. While the program isn't so processor intensive that I couldn't do the individual tests for each possible number of repetitions to see which returns the highest results, that just seems plain sloppy. Am I wrong? I feel there has to be an equation I could boil at least part of this down to but repetitions affects costs affects desirability while watching the budget... I just can't wrap my head around it yet.

Any help would be greatly appreciated.

EDIT: Shoot, forgot a title somehow.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!