playMaker

Author Topic: possibilities Checker  (Read 2768 times)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
possibilities Checker
« on: January 06, 2016, 09:19:31 AM »
Hi,
i need to check all possibilities from pre-made sets.
i don't need it ingame but i do need it to test the pre-made sets (about 10.000+)
to determine in which group (array List) it should be placed.
Here is a picture with some explanation.






These sets i have as a string in the array list and i split them up into 12 strings with 3 digits in each string.
Then i use a custom action "Get Next Random int"
and an "Int Switch" which will select one of these sets randomly without repeating a set.
Then i use "get substring" again to get the single number and then convert them to int values for the player to place in the boxes.

for testing i need to change the part "Get Next Random Int"
and i need to set the int 1/2/3/4/5/6/7/8/9/10/11/12 when done i need to set it 2/3/4/5/6/7/8/9/10/11/12/1 and so on, until all combinations have been done.

i was thinking to set all the possible combinations into an array and use array list get next for each completed set.

but when i started calculating i noticed that there are way to many possibilities to put those in manually.

So i am trying to find a different way to do this.
Any ideas are welcome :D
« Last Edit: January 06, 2016, 10:24:43 PM by djaydino »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: possibilities Checker
« Reply #1 on: January 06, 2016, 10:49:01 AM »
hi,

the fsm picture is too small -i can't see anything...

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: possibilities Checker
« Reply #2 on: January 06, 2016, 10:26:01 PM »
Hi,
for some reason the thumbnails don't seem to work properly, so i removed the thumbnails


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: possibilities Checker
« Reply #4 on: January 07, 2016, 10:22:35 PM »
Hi,
yea, i found some of those already when googling :)
but i started calculating and i got 39,916,800 possibilities
which i could preset into an array,
But then i need to let the computer check each of these possibilities.
even when i can check 100.000 per seccond it will take more than 5 min each.

So i think i will approach this differently.

I will check them manually and i will make something ingame to check if the points is higher than its array group. and if higher to remove it from the current array and set it into the higher array group

but thx for the help anyway :)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: possibilities Checker
« Reply #5 on: January 07, 2016, 10:58:35 PM »
Wow yeah.. But it is feasible if you make a c++ array plugin: http://www.alanzucconi.com/2015/10/11/how-to-write-native-plugins-for-unity/

I keep reading that using this method for very large array is 4-7x faster vs unity.

Wish u luck  ;D