Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8874611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:45:56+00:00 2026-06-14T18:45:56+00:00

NOTE: **Please read all other related questions :** Here is my first and second

  • 0

NOTE: **Please read all other related questions:**

Here is my first and second attempts at asking this question:

  • Efficient way to determine the outcome of test matrix
  • Would cartesian product be the best approach for this

Here is the problem:

  • I have several ( like 20 ) Boolean validations ( true / false )
  • All Boolean validations as a whole also have a validation Result

I’m trying to find the best solution to test all the validations and also the validation result. I was looking into a Matrix to hold all possible combinations but that might be an overkill.

Here is an example ( 1 – 20 ):

  • test_1 = Has 30 Kills
  • test_2 = Has Found Map 1
  • test_3 = Has Mastered Level 1
  • test_4 = Has Achieved Grunt Status
  • test_5 = Has Assault weapon
  • test_6 = Has Knife
  • test_7 = Has Grenade
  • test_x = Etc…

So when the Player has all these validations as TRUE I can then give a level result

  • if test_1, test_2, test_3 ( any combination of the three ): level = green

All combinations are ( 15 ):

  • test_1
  • test_2
  • test_3
  • test_1, test_2
  • test_1, test_3
  • test_2, test_1 ( duplicate can skip this )
  • test_2, test_3
  • test_3, test_1 ( duplicate can skip this )
  • test_3, test_2 ( duplicate can skip this )
  • test_1, test_2, test_3
  • test_1, test_3, test_2 ( duplicate can skip this )
  • test_2, test_1, test_3 ( duplicate can skip this )
  • test_2, test_3, test_1 ( duplicate can skip this )
  • test_3, test_1, test_2 ( duplicate can skip this )
  • test_3, test_2, test_1 ( duplicate can skip this )

So unique combinations are ( 7 instead of 15 ):

  • test_1
  • test_2
  • test_3
  • test_1, test_2
  • test_1, test_3
  • test_2, test_3
  • test_1, test_2, test_3

Now I’m trying to find the best possible solution to find unique combinations for all 20 validations and come up with a level validation from that matrix.

UPDATE:

Also I need to find only TRUE Combinations so you might read the Unique Combinations like this:

  • test_1
  • test_2
  • test_3
  • test_1, test_2
  • test_1, test_3
  • test_2, test_3
  • test_1, test_2, test_3

Boolean Value Results from Validation Tests

  • TRUE, FALSE, FALSE
  • FALSE, TRUE, FALSE
  • FALSE, FALSE, TRUE
  • TRUE, TRUE, FALSE
  • TRUE, FALSE, TRUE
  • FALSE, TRUE, TRUE
  • TRUE, TRUE, TRUE

So any of these combinations would be a GREEN level.

Also I need to know the order of the test validations as well as the matrix order to compare for level assignment. So for GREEN level I only need the validation result combination matrix for test 1, 2 and 3. So I could ignore tests 4 – 20

UPDATE #2:

I know this looks like a simple OR condition but I wanted to take out the combination logic to set the level into a matrix. I could use the matrix of combinations to determine the level logic without having to code additional or modify current logic in the code itself. I wanted to just compare the validations results for a given set of tests and assign a level to those results. Different permutations of the validation combinations would result in different level assignments.

I understand that I could add the combination logic in the code itself, but as this logic looks to be very volatile and thought this might offer a more flexible solution.
Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:45:58+00:00Added an answer on June 14, 2026 at 6:45 pm

    (removed my two previous answers for clarity)

    After your last edit, instead of answering directly, I would like first to be sure to 100% understand the “level detection algorithm” you want.

    If I understand well, you would like to define/maintain a simple configuration structure telling which tests give which level.

    e.g. with an associative array:

    array(
      'green' => array('test1', 'test2', 'test3'),
      'orange' => array('test2', 'test3', 'test5')
      ...
      );
    

    With the meaning: if one or more of the tests in the list are satisfied, assign that level (array key) to the player. Such logic could easily cover quite a lot of combinations, and would avoid handling a huge matrix.

    Maybe you want to extend the logic to tell, for example, that at least N tests among the test list are satisfied.

    array(
      'green' => array(
          'tests' => array('test1', 'test2', 'test3'),
          'nb_required' => 2
        ),
      ...
      );
    

    Is that what you want?

    BTW, why don’t you use a classic XP/level up system? :-p

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: This might seem like a Super User question at first, but please read
I’m using Drupal (please note that this is not a Drupal related question), and
[Please note that this is a different question from the already answered How to
Please note: This is a question about the Eclipse plugin Subversive , and not
Please note this is not a question about online/hosted SVN services. I am working
Please note that this question is from 2008 and now is of only historic
Before reading please note that I've googled this and read a ton of articles
Edit if you plan on answering this question please at least read it. Don't
Please note this application will never be running on a server system. I am
Please note that I'm not asking how but why. And I don't know if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.