Python function: building an array from a set of non-entirely matching subarrays.
- or -
Post a project like this1830
$100
- Posted:
- Proposals: 1
- Remote
- #2118896
- Awarded
Description
Experience Level: Intermediate
Hi, I need a Python function (will be part of a mastermind-like game):
the function has to build an unique array of integers Y -shape (10,)- given a sub-array list.
Y's items range is 1 to 20.
Each subarray can be of variable length (from two to nine elements): shape (n,) , item range 1 to 20.
Each item of each subarray may or may not not belong to Y (quantity and position are unknown, but generally most of the elements of each subarray are part of Y).
The task is finding Y (if possible) taking into account all or part of the various subarrays as a function of the unic 'implicit logic' (10 and no more than 10 values present in the subarrays belong to Y).
The function code must be properly commented in a sample Python module resolving the provided samples (uploaded in a txt file).
Given the logic nature of the task, prolog could be also used. In case, PySWIP must be used to connect the function to the sample python module. Prolog code must also be accurately commentend.
Many thanks in advance!
Giordano
the function has to build an unique array of integers Y -shape (10,)- given a sub-array list.
Y's items range is 1 to 20.
Each subarray can be of variable length (from two to nine elements): shape (n,) , item range 1 to 20.
Each item of each subarray may or may not not belong to Y (quantity and position are unknown, but generally most of the elements of each subarray are part of Y).
The task is finding Y (if possible) taking into account all or part of the various subarrays as a function of the unic 'implicit logic' (10 and no more than 10 values present in the subarrays belong to Y).
The function code must be properly commented in a sample Python module resolving the provided samples (uploaded in a txt file).
Given the logic nature of the task, prolog could be also used. In case, PySWIP must be used to connect the function to the sample python module. Prolog code must also be accurately commentend.
Many thanks in advance!
Giordano

Giordano D.
0% (0)Projects Completed
1
Freelancers worked with
1
Projects awarded
100%
Last project
1 Nov 2018
Italy
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies