Decision Support Project, knapsack-problem

Hello everybody,

I have a problem. For an university project we have to develop an application for the knapsack-problem in short time but nobody in our group got experiences in developing

Please excuse my bad English, I try to explain what we’ve got to do.

If you take a look on the Screenshot, you’ll see one big bag and 18 small monetary pockets. This is everything what we’ve got at this moment.

Every monetary pocket has a cash value and a weight. This information should appear in a box next to while someone clicks on the respective monetary pocket.

Now, the monetary pockets should be stowed away in the big bag and disappear afterwards.

Under the big bag should be two high scores faded in. One high score for the cash value and another high score for the weight.

The wrapped up cash value are added up in the first high score. The wrapped up weights will be drawn off from a value X (e.g. 2 lb).
If it’s impossible to take an other monetary pocket into the big bag (backpack is almost full - score near 0), the game will be over.

I hope you understand what we’ve got to do and can help us with regards to the source code.

Thanks and dear greetings
Dominik

You’ve got 3 problems-

You are in a class that either requires application development or you chose a project requiring application development and don’t want to learn how to write code

You are in the wrong group (no one wants to learn to code)

You are up against time

I’d start with:

– near the top of your main or module

– consider this your bag o money

local BagValue = 0

Good luck,

Nail

Is this a paid project?

Hello, Nail,

thanks for your answer.
Maybe you can call me the group where I belong with my question? If there’s such a group in this forum. I’m completely ignorant where this subject belonged.

@JonPM: Unfortunately, not. If we don’t create it, we’ve just only the physical use.

Thanks and dear greetings

@dspg91,

You have posted in the correct forum if you have a question,  the problem is you are asking forum members for much more than a question, you apparently are asking for the source code for a specific project to be handed to you.

As you last stated, you need to create the source code so you understand it, this means you need to figure it out and write the code.

You have posted no code or specific questions, how are you to learn?

You will learn a lot from coding your project, but you have to start actually writing code in order develop your project.

I have no idea how you spawned your small money bags in your screenshot. 

I would create an indexed table of small money bags with values and weights as properties.

Shuffle the table of money bags, then loop through the table spawning the bags in a random order so when the user selects a bag, they don’t know it’s value or weight.

I believe this scheme would work as a starting place for your game.

You learn learn how to create and work with tables in lua.

Hope this helps,

Nail

You’ve got 3 problems-

You are in a class that either requires application development or you chose a project requiring application development and don’t want to learn how to write code

You are in the wrong group (no one wants to learn to code)

You are up against time

I’d start with:

– near the top of your main or module

– consider this your bag o money

local BagValue = 0

Good luck,

Nail

Is this a paid project?

Hello, Nail,

thanks for your answer.
Maybe you can call me the group where I belong with my question? If there’s such a group in this forum. I’m completely ignorant where this subject belonged.

@JonPM: Unfortunately, not. If we don’t create it, we’ve just only the physical use.

Thanks and dear greetings

@dspg91,

You have posted in the correct forum if you have a question,  the problem is you are asking forum members for much more than a question, you apparently are asking for the source code for a specific project to be handed to you.

As you last stated, you need to create the source code so you understand it, this means you need to figure it out and write the code.

You have posted no code or specific questions, how are you to learn?

You will learn a lot from coding your project, but you have to start actually writing code in order develop your project.

I have no idea how you spawned your small money bags in your screenshot. 

I would create an indexed table of small money bags with values and weights as properties.

Shuffle the table of money bags, then loop through the table spawning the bags in a random order so when the user selects a bag, they don’t know it’s value or weight.

I believe this scheme would work as a starting place for your game.

You learn learn how to create and work with tables in lua.

Hope this helps,

Nail