Nov 21, 2009

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

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

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

CrazyPensil
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.

Comment/Reply (w/o sign-up)

BitShift
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"

Comment/Reply (w/o sign-up)

Hercco
Yeah that was really hard to understand. It either sounds like an impossible or a trivial problem. biggrin.gif

Comment/Reply (w/o sign-up)

Jeigh
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?

Comment/Reply (w/o sign-up)

CrazyPensil
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.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Logical Yep It39s


    Looking for good, logical, question, yep

See Also,

*SIMILAR VIDEOS*
Searching Video's for good, logical, question, yep
advertisement



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

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com