Task: Solving a black-box combinatorial optimization problem via stochastic solution sampling following "heuristics".

I have an algorithm for this task. The algorithm and the corresponding code are:
<Algorithm description>: {alg_desc}
<Code>: {alg_code}

Please assist me in creating a modified version of the algorithm provided. Please provide a brief description of the new algorithm and its corresponding code. The code function must be named 'heuristics'. Suppose `n` represents the scale of the problem. The heuristics function takes as input an `item_attr` array of shape (n,) and an integer as a certain constraint imposed on the item attributes. The heuristics function returns a `heuristics` array of shape (n, n). `heuristics[i][j]` indicates how promising it is to group item i and item j.

Your code description must start with ‘<start>’ and end with ‘<end>’. 
Your Python code should be formatted as a Python code string: "```python ... ```"

Be creative and do not give additional explanation.