|
|
A Good Logical Question.... - Yep, it's me.... Again ;) | ||
Discussion by CrazyPensil with 4 Replies.
Last Update: July 7, 2006, 6:02 am | |||
Again I've faced up with a problem... I'm writing a simple AI for a bot, but it still works in a slow way :*(
So, the thing I'mma ask you, dear programmers, is that one:
We've got a set of actions that can be done(n).
Each action requires a certain amount of ActionPoints(AP)
Bot has an unknown amount of ap(m)
So, we must find Number of possible combinations, given total number of AP, array of actions and their costs.
As you might understand, I need the formula.
Don't suggest any ways to find the combinations themselves - this is already done by me, that formula would a great deal accelerate the process.
So, the thing I'mma ask you, dear programmers, is that one:
We've got a set of actions that can be done(n).
Each action requires a certain amount of ActionPoints(AP)
Bot has an unknown amount of ap(m)
So, we must find Number of possible combinations, given total number of AP, array of actions and their costs.
As you might understand, I need the formula.
Don't suggest any ways to find the combinations themselves - this is already done by me, that formula would a great deal accelerate the process.
Tue Jul 4, 2006 Reply New Discussion
OK wait, if you have a set number of actions and each action requires a certain amount of AP, but you do not know the amount of AP, then isn't it going to be the same number of possible solutinos every time, which is all of them...
Carefully re-word your problem, its hard to understand. Before anyone can devise any type of "formula", you need to make sure you work out the logic first, and make us be able to understand your logic so we can create a "formula"
Carefully re-word your problem, its hard to understand. Before anyone can devise any type of "formula", you need to make sure you work out the logic first, and make us be able to understand your logic so we can create a "formula"
Wed Jul 5, 2006 Reply New Discussion
Yeah that was really hard to understand. It either sounds like an impossible or a trivial problem.
Thu Jul 6, 2006 Reply New Discussion
Haha thats what I was thinking Hercco, either it sounds insanely simple or near impossible. Either way I'm pretty sure we need a more clear explanation and possibly more information. Maybe provide a small scale example?
Thu Jul 6, 2006 Reply New Discussion
OK, I re-word in a simpler way.
Formula gets the data:
- Number of AP bot has
- Set of actions with cost of each one
And gives out the amount of combinations where some of actions ore chosen, but total cost of actions in each combination doesn't exceed total number of AP bot has.
Formula gets the data:
- Number of AP bot has
- Set of actions with cost of each one
And gives out the amount of combinations where some of actions ore chosen, but total cost of actions in each combination doesn't exceed total number of AP bot has.
Fri Jul 7, 2006 Reply New Discussion
How To Create A Control Panel? (3)
|
(1) Friend Networking Script... Help! Adding & removing friends
|
Index




