bookmark - A Good Logical Question.... Yep, it's me.... Again ;)

A Good Logical Question.... - Yep, it's me.... Again ;)

 
 Discussion by CrazyPensil with 4 Replies.
 Last Update: July 7, 2006, 6:02 am
 
bookmark - A Good Logical Question.... Yep, it's me.... Again ;)  
    
free web hosting
 
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.

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"

Wed Jul 5, 2006    Reply    New Discussion   

Yeah that was really hard to understand. It either sounds like an impossible or a trivial problem. :unsure:

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.

Fri Jul 7, 2006    Reply    New Discussion   

Quickly Post to A Good Logical Question.... Yep, it's me.... Again ;) w/o signup Share Info about A Good Logical Question.... Yep, it's me.... Again ;) using Facebook, Twitter etc. email your friend about A Good Logical Question.... Yep, it's me.... Again ;) Print
Reply / Comment Ask a Question? Share / Bookmark E-Mail a Friend Print

How To Create A Control Panel?   How To Create A Control Panel? (3) (1) Friend Networking Script... Help! Adding & removing friends  Friend Networking Script... Help! Adding & removing friends