Completed Word Grid
Definitions of the wild words, for the curious
aglee - alternate spelling of agley, which means awry
keeks - conjugation of keek, which means to peek
pogge - a European marine scorpaenoid fish, also called an armed bullhead
odyle - a hypothetical force formerly thought to be responsible for many natural phenomena, such as magnetism, light, and hypnotism
Capek/Čapek - Czech sci-fi writer (introduced the word "robot"!)
kytes - a Scottish word for bellies
Completed Score Grid
I really wanted to try and solve this as manually as I could, but seeing how many possibilities there were after my first attempt (2997 for one row!), I soon realized this was almost impossible, so I fully automated (brute-forced) this solution.
I first processed the dictionary to filter all the five-letter words with only letters (no spaces or punctuation) and remove accents (to allow for mapping to letter scores) and saved this to a text file for later.
First, I created a mapping of each letter to its score. I also created a function that would take a string and return a tuple based on its "skyscraper value" from either side, so a word from the first row would return
(3, 1). I then created a list for the possible words for each skyscraper tuple found on the grid. I also set up lists to store the possible words for each row and each column.
Then, in a while loop that would print out the results on a keyboard interrupt (this code could have been cleaner), I wrote code that would iterate through each row. For each column, it would take the possible words for that row and make a set of the possible letters that could be in that column in the row (eg. if the possible words for a row were "tried", "tease", and "wrote", then the possible letters for the first column in that row would be "t" and "w"). It would then filter each column to keep only words that matched the possible letters for each column. I then repeated this, swapping rows and columns, and printed how many possible words there were for each row and column. Once I saw there was only one possibility for each row and column, I got that sweet, sweet answer!
Trying to solve it at least a little bit manually, I made code to count how many possible rows there were with possible word in each column (satisfying the skyscrapers) that matched each letter (eg. "tests" in the first row would be satisfied by "toast", "egret", "salve", "taser", and "savor" in the corresponding columns). Running this once gave the following number of possibilities for the rows: 131, 258, 2, 2997, 310. This meant the middle row had to be "Egypt" or "schmo" (which it was).
I kept iterating over this process, eventually switching to columns and finding the possible letters for each spot in the column and filtering those out, similar to what I did in my final solution. I think my main issue was that I only used one list for all lines with a given skyscraper value (
sky31 contained the possible words for the first and second rows), which meant there was some overlap. Eventually I ended up with "d" in the first column of the fifth row (which doesn't match the final solution), and filtering rows/columns to match that led to some rows and/or columns (I don't remember which) that no longer had any valid words meeting the new criteria. I tried filtering all but that specific case, but similar issues kept happening, so instead of trying to figure them out, I refactored my code to get the fully automated solve that got me the answer.