Question: How to distribute English alphabet letters among Boggle game dice? How to make rolling for example letter "A" more often than others? How to choose how many copies of each letter to make, and how many copies of them to put on one dice? Can you please answer to these questions?

Answer: 
Assuming you want it to approximately match the distribution of letters in English words, you can generate a histogram with something like this:

> 
> cat /usr/share/dict/words |perl -pe 's/[^a-z]//gs' |perl -e 'print join("\n", split //, <>) . "\n"' |sort |uniq -c
> 
> 
> 

Convert these values into probabilities by dividing by the total, multiply by the total number of dice, multiply by 6, and then round up to an integer so you have at least one instance of each letter. Fudge the numbers so that the total is divisible by 6. Then label each face with those letters in such a way that you minimize the number of duplicate letters on each die.

If we make the problem more specific, there is probably a better (but more complicated) way. If you actually want to maximize the expected number of words that appear on the Boggle board, I think you will have to use some sort of [simulated annealing](http://en.wikipedia.org/wiki/Simulated_annealing) approach to optimize it.
I've just written a simple python program to do this, and am looking for the actual letters that occur on the dice.

You want a 16 element array, each element of which is a 6-element array of ints.

```
import array
lets = [array.array('i',[0]*6)]*16

```

constructs the required array. Then you put the appropriate character codes in. (Or something like this -- I can't remember the array type codes apart from i, so I just used that, together with

```
import random
lets[i][j] = random.randrange(26) + 'A'.encode('UTF-8')[0]

```

this gives each letter equal probability. You then need to replace this line with something that, for each i and j, gets the right letter for an actual Boggle game.

Then you do

```
a = []
for i in range(16):
    a.append(random.choice(lets[i]))

```

to get an array of 16 letters.

Finally,

```
for i in range(16):
    print(a[i],end=' ')
    if i % 4 == 3:
         print()

```

will print out a nice 4x4 grid, like

```
I O S O 
C O O S 
C C U P 
S U I U

```

and this final example shows why you need to manually set the letter choices rather than picking random letters from the alphabet.

<http://thewikiman.allsup.co/BogglePlay> has a complete Python script for this.