• Play
  • About
  • News
  • Forums
  • Yppedia
  • Help
Welcome Guest   | Login
  Index  | Recent Threads  | Register  | Search  | Help  | RSS feeds  | View Unanswered Threads  
  Search  


Quick Go »
Thread Status: Normal
Total posts in this thread: 6
[Add To My Favorites] [Watch this Thread] [Post new Thread]
Author
Previous Thread This topic has been viewed 1010 times and has 5 replies Next Thread
drc500free

Member's Avatar


Joined: Aug 27, 2004
Posts: 5277
Status: Offline
Blacksmithing Piece Frequencies Reply to this Post
Reply with Quote

There is a blacksmithing tip that indicates pieces have different chances of spawning at different locations. But how?

To make the game as playable as possible, the pieces are weighted by Degrees of Freedom, or the number of legal moves you could make if you hit that piece in that spot.

For example, a Rook on the middle edge of the board has 3 degrees of freedom (the opposite edge and each adjacent corner). A Four has 1 degree of freedom. So a Rook is 3 times more likely to spawn there than a Four.

This is useful if you are looking for a specific piece to show up for chaining. For example, a Two is more than twice as likely to spawn in the middle 2x2 than in the spot between the corner and the center.

Oh, and bishops can't show up in corners, even though they would technically have 1 DoF.
----------------------------------------
-Darvid
sundancer wrote: 
will you please explain to me one more time why it would not be acceptable to blockade us?
Squid wrote: 
Because I shouldn't have to go through all that effort.

----------------------------------------
[Edit 1 times, last edit by drc500free at Jul 25, 2013 9:52:52 PM]
[Jul 25, 2013 9:43:26 PM] Show Printable Version of Post        Send Private Message [Link]  Go to top 
drc500free

Member's Avatar


Joined: Aug 27, 2004
Posts: 5277
Status: Offline
Re: Blacksmithing Piece Frequencies Reply to this Post
Reply with Quote

Occurrences predicted from 100 boards:

Queens
16 19 18 18 19 16
19 22 21 21 22 19
18 21 19 19 21 18
18 21 19 19 21 18
19 22 21 21 22 19
16 19 18 18 19 16
Rooks
11 11 11 11 11 11
11 11 10 10 11 11
11 10 9 9 10 11
11 10 9 9 10 11
11 11 10 10 11 11
11 11 11 11 11 11
Bishops
0 7 7 7 7 0
7 11 10 10 11 7
7 10 9 9 10 7
7 10 9 9 10 7
7 11 10 10 11 7
0 7 7 7 7 0
Knights
11 11 14 14 11 11
11 11 15 15 11 11
14 15 19 19 15 14
14 15 19 19 15 14
11 11 15 15 11 11
11 11 14 14 11 11
Ones
16 19 18 18 19 16
19 22 21 21 22 19
18 21 19 19 21 18
18 21 19 19 21 18
19 22 21 21 22 19
16 19 18 18 19 16
Twos
16 11 18 18 11 16
11 8 13 13 8 11
18 13 19 19 13 18
18 13 19 19 13 18
11 8 13 13 8 11
16 11 18 18 11 16
Threes
16 11 11 11 11 16
11 8 8 8 8 11
11 8 7 7 8 11
11 8 7 7 8 11
11 8 8 8 8 11
16 11 11 11 11 16
Fours
16 11 4 4 11 16
11 8 3 3 8 11
4 3 0 0 3 4
4 3 0 0 3 4
11 8 3 3 8 11
16 11 4 4 11 16

----------------------------------------
-Darvid
sundancer wrote: 
will you please explain to me one more time why it would not be acceptable to blockade us?
Squid wrote: 
Because I shouldn't have to go through all that effort.

[Jul 25, 2013 9:48:21 PM] Show Printable Version of Post        Send Private Message [Link]  Go to top 
drc500free

Member's Avatar


Joined: Aug 27, 2004
Posts: 5277
Status: Offline
Re: Blacksmithing Piece Frequencies Reply to this Post
Reply with Quote

Degrees of Freedom per piece:
Queens
3 5 5 5 5 3
5 8 8 8 8 5
5 8 8 8 8 5
5 8 8 8 8 5
5 8 8 8 8 5
3 5 5 5 5 3
Rooks
2 3 3 3 3 2
3 4 4 4 4 3
3 4 4 4 4 3
3 4 4 4 4 3
3 4 4 4 4 3
2 3 3 3 3 2
Bishops (corners are hardcoded to 0)
0 2 2 2 2 0
2 4 4 4 4 2
2 4 4 4 4 2
2 4 4 4 4 2
2 4 4 4 4 2
0 2 2 2 2 0
Knights
2 3 4 4 3 2
3 4 6 6 4 3
4 6 8 8 6 4
4 6 8 8 6 4
3 4 6 6 4 3
2 3 4 4 3 2
Ones
3 5 5 5 5 3
5 8 8 8 8 5
5 8 8 8 8 5
5 8 8 8 8 5
5 8 8 8 8 5
3 5 5 5 5 3
Twos
3 3 5 5 3 3
3 3 5 5 3 3
5 5 8 8 5 5
5 5 8 8 5 5
3 3 5 5 3 3
3 3 5 5 3 3
Threes
3 3 3 3 3 3
3 3 3 3 3 3
3 3 3 3 3 3
3 3 3 3 3 3
3 3 3 3 3 3
3 3 3 3 3 3
Fours
3 3 1 1 3 3
3 3 1 1 3 3
1 1 0 0 1 1
1 1 0 0 1 1
3 3 1 1 3 3
3 3 1 1 3 3

----------------------------------------
-Darvid
sundancer wrote: 
will you please explain to me one more time why it would not be acceptable to blockade us?
Squid wrote: 
Because I shouldn't have to go through all that effort.

[Jul 25, 2013 9:50:58 PM] Show Printable Version of Post        Send Private Message [Link]  Go to top 
JakSparow117

Member's Avatar


Joined: Jul 8, 2007
Posts: 388
Status: Offline
Re: Blacksmithing Piece Frequencies Reply to this Post
Reply with Quote

Are these all red layers? Because if I were to put together a frequency predictor over 100 boards, I would get skewed results from constantly placing jugs in the corner.

Also, I'd like to point out that YPP does not always play nice with their piece spawns. AFAIK, there are boards with no solutions as well as some that have tons of solutions.
----------------------------------------
Mackso-Emerald
[Jul 29, 2013 7:15:06 PM] Show Printable Version of Post        Send Private Message [Link]  Go to top 
drc500free

Member's Avatar


Joined: Aug 27, 2004
Posts: 5277
Status: Offline
Re: Blacksmithing Piece Frequencies Reply to this Post
Reply with Quote

I original collected my data on 40 fresh boards. I assumed symmetry in both directions, which gives 160 samples for each position. And none of those would be jugs.

DoF is a pretty elegant solution to making the boards more playable than a uniform random distribution. You'll still get unplayable boards, but they're less likely since the game avoids spawning pieces that would have fewer moves on a full board.

The only deviation I saw was the complete lack of corner bishops, which I assume were removed because getting reflected back and forth with corner bishops even once would pretty much screw your whole round. There may be something else to this, but every position/piece combination was within 30% of the expected number, and several were within 5%. I didn't want to overfit by adding any other special rules that the developer would have had to explicitly add.

I am assuming that the distribution doesn't change over the course of the game. I did do some sanity checking with the tiles generated as you play, and it seemed to be the same pattern. I don't see another elegant distribution that it would change to over the course of a game. One thing the game definitely DOESN'T do is calculate how many possible moves you have given which target spaces are complete; even if all the landing spots from a "2" are actually fully hammered, it will still spawn one.

tl;dr: this holds true on the assumption that "no corner bishops" is the only special rule, and that there's no change to the rules as the game progresses.
----------------------------------------
-Darvid
sundancer wrote: 
will you please explain to me one more time why it would not be acceptable to blockade us?
Squid wrote: 
Because I shouldn't have to go through all that effort.

----------------------------------------
[Edit 1 times, last edit by drc500free at Jul 31, 2013 3:27:08 PM]
[Jul 31, 2013 3:24:44 PM] Show Printable Version of Post        Send Private Message [Link]  Go to top 
JakSparow117

Member's Avatar


Joined: Jul 8, 2007
Posts: 388
Status: Offline
Re: Blacksmithing Piece Frequencies Reply to this Post
Reply with Quote

The game will occasionally give you boards where all the corners are Queens/Rooks. Its better than corner bishops, but not much since you still have to hit them last to have a chance to complete.
----------------------------------------
Mackso-Emerald
[Aug 3, 2013 3:12:17 AM] Show Printable Version of Post        Send Private Message [Link]  Go to top 
[Show Printable Version of Thread] [Post new Thread]

Puzzle Pirates™ © 2001-2016 Grey Havens, LLC All Rights Reserved.   Terms · Privacy · Affiliates