text:
Create a solar system
Intro
This is based on an actual problem I recently faced while making a computer game and I thought it would make for a nice round of code-golf.
There are seven main spectral classes of star which put out varying amounts of heat. The geology of planets around a star are greatly influenced by the amount of heat received from the star, which is a factor of spectral class and distance from the star. Hence Mercury is practically molten, Neptune frozen.
The galaxy in my game is procedurally generated and randomly selecting planet types for given stars turned out to be a real 'if statement hell'!
The challenge
Your method should select one planet from a list of planet types appropriate for the class of star, based on a minimum heat threshold, a maximum heat threshold and a random number.
For simplicity this challenge will only use a class G star, just like our sun.
Inputs
An integer heat in the range 4 to 11 representing the amount of heat received by the planet from the star.
Variables
This table shows the possible planets based on heat. Your method should first narrow the available choices based on the heat min and heat max, heat should fall on or between the two. E.g. with a heat of 10 passed in the only choices would be Desert, Iron and Lava.
Planet type    Heat min   Heat max   Random Chance
Gas Giant         4          9            15
Ice               4          6            10
Ice Giant         4          6            10
Gaia class        5          7            10
Dense Atmosphere  7          9            10
Desert            7          10           25
Iron              7          10           14
Lava             10          11           6

Next, the probability of a planet (in the remaining choices) being chosen is its random chances divided by the sum of the random chances of all the choices.
In the above example, the probability of Iron being chosen is 14/(25+14+6).
Output
Return the planet type as a string.
Do the best you can to avoid logic arrowheads. Shortest code wins, points all round for creativity. Happy golfing!

Should the "class" of "Gaia class" be capitalised like everything else?

@JonathanAllan it's lower case as it's not a proper noun

@Absinthe Then why is Dense Atmosphere uppercase?

@EriktheOutgolfer Because [Dense Atmosphere] is the name of the class of planet and as such both words form the proper noun, like [Erik Outgolfer]. Also, it's in a computer game, so add a sprinkle of artistic licence :)

... have anyone said that? | Welcome to PPCG, and nice first challenge!

Thanks :) Been reading the challenges for a while, thought I'd give it a go.

What are "logic arrowheads"?

@EricDuminil aka an arrowhead anti-pattern, aka nested-if-statement-hell! http://wiki.c2.com/?ArrowAntiPattern

TIL the formal names for this anti-pattern and guard clauses.

Jelly,  78  75 bytes
“'ĖøÆḳƙ’ḃ7ṣ6Ä+3r/ċ€×“½½½½©ÐÇı‘
“ŀỊẋ8ƒ³ẈRɼƈñqẋẏȧɱḌ<ṄỴḳ⁾ÆʋeẒĊ'@ƬØƓƝ}ḟ¬»Ỵx'ÇX

A monadic link accepting an integer (in [4,11]) which returns a list of characters.
Try it online!
How?
Creates the heat ranges of the planets as a list of lists and counts the occurrences of the input heat in those lists to get a list of zeros and ones representing which planet types are possible, then multiplies by the likelihood numbers of the eight planet types to get the distribution. The distribution is used to repeat the planet type names, and finally, a uniform random choice is made.
“'ĖøÆḳƙ’ḃ7ṣ6+\+3r/ċ€×“½½½½©ÐÇı‘ - Link 1, getDistribution: integer
“'ĖøÆḳƙ’                        - base 250 integer = 39824688429662
        ḃ7                      - to bijective-base 7 = [1,1,2,4,7,1,4,4,6,2,2,2,2,1,5,3,3]
          ṣ6                    - split at sixes = [[1,1,2,4,7,1,4,4],[2,2,2,2,1,5,3,3]]
            +\                  - reduce by addition = [[1,1,2,4,7,1,4,4],[3,3,4,6,8,6,7,7]]
              +3                - add three = [[4,4,5,7,10,4,7,7],[6,6,7,9,11,9,10,10]]
                r/              - reduce by inclusive range = [[4,5,6],[4,5,6],[5,6,7],[7,8,9],[10,11],[4,5,6,7,8,9],[7,8,9,10],[7,8,9,10]]
                  ċ€            - count (input) in €ach e.g. for 5: [1, 1, 1, 0,0, 1, 0, 0]
                     “½½½½©ÐÇı‘ - list of code-page indices        [10,10,10,10,6,15,14,25]
                    ×           - multiply                         [10,10,10, 0,0,15, 0, 0]

“ ... »Ỵx'ÇX - Main link: integer
“ ... »      - compressed string = "Ice\nIce Giant\nGaia class\nDense Atmosphere\nLava\nGas Giant\nIron\nDesert"
       Ỵ     - split at new lines = ["Ice","Ice Giant","Gaia class","Dense Atmosphere","Lava","Gas Giant","Iron","Desert"]
          Ç  - call last link (1) as a monad e.g. for 5: [10,10,10,0,0,15,0,0]
         '   - spawn:
        x    -   times e.g. for 5: ["Ice","Ice","Ice","Ice","Ice","Ice","Ice","Ice","Ice","Ice","Ice Giant","Ice Giant","Ice Giant","Ice Giant","Ice Giant","Ice Giant","Ice Giant","Ice Giant","Ice Giant","Ice Giant"]
           X - a random choice from that list

Crazy! Well done.

@Absinthe You can simply upvote. Side note: On Code Golf we typically don't accept answers.

@user202729 I'll add votes in a day or two. I was looking over the GitHub page for Jelly trying to unravel this code. I believe Crazy! is most appropriate :)

Thanks for the 'How' section, interesting to see how you did it for people like me who don't know the language.

@Absinthe yes, I believe a descriptive section is often a good thing to have even for non-esoteric language submissions :)

You people are truly insane.

That has to be the longest Jelly script I've seen in a while; which is not good news for the rest. Well done.

@seshoumara 22 bytes of code, 56 bytes of constants :p

@Selvek Welcome to the site!

R, 225 223 183 bytes
Thanks to Giuseppe for clever refactoring to take it down to 188 bytes; the remaining five were shaved off by using less redundant number representations.
i=scan()-4
sample(c("Gas Giant","Ice","Ice Giant","Gaia class","Dense Atmosphere","Desert","Iron","Lava")[l<-c(0,0,0,1,3,3,3,6)<=i&c(5,2,2,3,5,6,6,7)>=i],1,,c(3,2,2,2,2,5,2.8,1.2)[l])

Try it online!

That's a nice approach, I may have to think about removing my if statement maze if favour of this in C# :)

I suspect saving the logical index rather than using with,data.frame, and subset will be shorter.

188 bytes

@Giuseppe, you can probably gain a few more bytes by using some of my tricks with planet data, but I think I'll also improve mine using your idea of separating the probabilities vector from the rest of the data.

JavaScript 212
Edit 6 bytes save thx Jonathan Allan
h=>[963,640,640,649,667,1628,924,437].map((z,i)=>(z/8&7)+4>h|z%8+6<h?0:t=r.push(...Array(z>>6).fill(i)),r=[])&&"Gas Giant,Ice,Ice Giant,Gaia class,Dense Atmosphere,Desert,Iron,Lava".split`,`[r[t*Math.random()|0]]

less golfed
h=>(
   r = [],
   // heat min,max and chance encoded in base 8 with offsets
   // min range 4 to 10, with offset 4, 0 to 6
   // max range 6 to 11, with offset 6, 0 to 5
   [(4-4)*8 + 9-6 + 15*64,
    (4-4)*8 + 6-6 + 10*64,
    (4-4)*8 + 6-6 + 10*64,
    (5-4)*8 + 7-6 + 10*64,
    (7-4)*8 + 9-6 + 10*64,
    (7-4)*8 + 10-6+ 25*64,
    (7-4)*8 + 10-6+ 14*64,
    (10-4)*8+ 11-6+  6*64]
   .forEach( (z,i) => (
      min = (z / 8 & 7) + 4,
      max = z % 8 + 6,
      chance = z >> 6,
      min > h || max < h
      ? 0 // out of range
      // add current position i repeated 'chance' times
      // array size in t
      : t = r.push(...Array(chance).fill(i))
   ),
   pos = r[t * Math.random() | 0],
   ["Gas Giant", "Ice", "Ice Giant", "Gaia class", "Dense Atmosphere", "Desert", "Iron", "Lava"][pos]
)

Test

var F=
h=>[963,640,640,649,667,1628,924,437].map((z,i)=>(z/8&7)+4>h|z%8+6<h?0:t=r.push(...Array(z>>6).fill(i)),r=[])&&"Gas Giant,Ice,Ice Giant,Gaia class,Dense Atmosphere,Desert,Iron,Lava".split`,`[r[t*Math.random()|0]]

function test()
{
   var heat=+H.value
   var i,result,hashtable={},rep=1e5
   for (i=0;i<rep;i++)
     result = F(heat),
     hashtable[result] = -~hashtable[result]

   console.log('Input',heat)
   for (i in hashtable)
   {
     console.log(i,(hashtable[i]/rep*100).toFixed(2),'%')
   }
}
<input id=H type=number min=1 max =15 value=10>
<button onclick='test()'>Test</button>

A couple of your base 16 numbers are 1 off (should be [3913, 2630, 2630, 2647, 2681, 6522, 3706, 1707])

I think (but am not 100%) you can save 2 by replacing (z/16&15) with z/16&15. Regardless, you can save 6 bytes using a base 8 compression with offsets of three and six... use [971,648,648,657,675,1636,932,445] with z/8&7+3, z%8+6 and z>>6 :)

@JonathanAllan offsets! Great idea, thx

@JonathanAllan i need brackets for (z/8&7)+4 because & has lower priority - it would be 7/8&(7+4)

Could you replace (z/8&7)+4>h with z/8&7>h-4?

@Shaggy did you see the comment right above yours? (long story short: no)

Charcoal, 115 111 bytes
≔Ｉ⁻Ｎ³θＦ⁸«≔§⪪”↷＆∧⬤.YLφκ¦(⁼；σ≕]✂↙ζＣ” ιη¿›θη¿‹θ§η¹ＦＩ✂η²⊞υι»§⪪”↓(″1↨▷]Ｕ,&ζ^iＩ″ＲＳＹ≡´⍘'#﹪υＶw5Ｖu>D<U5r6⁰Ｑ▷Ｚ◨⌕⁸ΣεCＺ”¶‽υ

Try it online! Link is to verbose version of code. Edit: Saved 4 bytes thanks to @ASCII-only. Explanation:
≔Ｉ⁻Ｎ³θ

Subtract 3 from the input so that it can be compared against single digits.
Ｆ⁸«≔§⪪”↷＆∧⬤.YLφκ¦(⁼；σ≕]✂↙ζＣ” ιη

Split the string 0715 0410 0410 1510 3710 3825 3814 696 on spaces (spaces seem to compress better than commas but I didn't try any other characters) and loop over each portion.
¿›θη¿‹θ§η¹ＦＩ✂η²⊞υι»

Compare the input against the first and second digits and if it's between then push the loop index the given number of times to the predefined empty list, thus populating it.
§⪪”↓(″1↨▷]Ｕ,&ζ^iＩ″ＲＳＹ≡´⍘'#﹪υＶw5Ｖu>D<U5r6⁰Ｑ▷Ｚ◨⌕⁸ΣεCＺ”¶‽υ

Split the list of planets on newlines (again, better than commas for some reason) and select the element corresponding to a index chosen randomly from the list.

Nice one. How does the Random(u) factor in the different probabilities for each planet? (I know nothing about Charcoal).

It is choosing an index from a list with the correct distribution of planetType indices due to the "push the loop index the given number of times to the predefined empty list, thus populating it." then using the chosen index to get the planetType name.

@JonathanAllan Got it, thanks

111 bytes, I think? In general just try using characters earlier in the character class, see compression#11. Default order saves another byte, but that's basically only if you only have symbols

@ASCII-only Clear as mud... why are newlines better there but spaces for the other string?

@Neil Ooops >_> turns out there was an character in the codepage that wasn't supposed to be there, they're both 111 bytes

@Neil Or rather, I added it a while back for no apparent reason, along with two other characters

also it seems that you've forgotten a code block

Coconut, 214 195 bytes
t->choice..sum([[n]*g(p)*(g(a)<t<g(b))for*n,a,b,p in'Gas Giant3AF_Ice37A_Ice Giant37A_Gaia class48A_Dense Atmosphere6AA_Desert6BP_Iron6BE_Lava9C6'.split('_')],[])
from random import*
g=int$(?,36)

Try it online!
A Python port would be 203 200 bytes long:
lambda t:choice(sum([[n]*int(p,36)*(int(a)<t<int(b,36))for*n,a,b,p in'Gas Giant3AF_Ice37A_Ice Giant37A_Gaia class48A_Dense Atmosphere6AA_Desert6BP_Iron6BE_Lava9C6'.split('_')],[]))
from random import*

Try it online!

Interestingly, at the time of writing, your Python port beats all other Python solutions!

R, 196 193 190 175 171 bytes
sample(readLines(,8),1,,c(3,2,2,2,2,5,2.8,1.2)*((x=scan()-3)>c(0,0,0,1,3,3,3,6)&x<c(7,4,4,5,7,8,8,9)))
Gas Giant
Ice
Ice Giant
Gaia class
Dense Atmosphere
Desert
Iron
Lava

Try it online!
Initially inspired by this solution by @rturnbull, however as both submissions have significantly evolved, this is now essentially a mix of ideas of the original author, @Giuseppe who has been very helpful in comments, and mine. Here is a summary of key points that helped to bring the byte count down:

Encoding planet data as CSV Collecting names with readLines to avoid the large number of quotation characters around strings.
Tweaking the heat params so that we could use < and > signs
instead of <= and >=.
Changing the heat data format from Heat min, Heat max to Heat min,
Heat Delta to get rid of double digit numbers.Replaced by shifting all numbers by -3
Dividing all planet probabilities by 5 which also results in a few less digits.
Multiplying the vector of planet probabilities with the vector of Booleans (indicating whether our input satisfies the heat requirements) to nullify the probabilities of unsuitable planets.

Probably, a few more bytes could be gained by applying some sort of data compression.I think, not anymore.

t= instead of text= will save 3 bytes as well.

169 bytes

solid answer, though, using read.csv for a single column suggested readLines to get rid of the quotes entirely, although you do have to explicitly set n

@Giuseppe, it's 171 bytes though, as you also removed the parentheses that were necessary to maintain operator precedence, and your version gives wrong probabilities. Still, a brilliant suggestion!

Oh I wondered where those parentheses had come from....

Python, 282 Bytes, 261 Bytes:
from random import*
i,p,l=input(),[('Gas Giant',3,11,15),("Ice",3,7,10),("Ice Giant",3,7,10),("Gaia Class",4,8,10),("Dense Atmosphere",6,10,10),("Desert",6,11,25),("Iron",6,11,14),("Lava",9,12,6)],[]
for x in p:exec"l+=x[0],;"*(x[1]<i<x[2])*x[3]
print choice(l)

Pretty simple - fairly sure it could be golfed more - Still looking for a better way to represent the planet range and probability data.
If i is in range of the planet type, appends it to the list according to the probability, then randomly prints one.
EDIT: With credit to Jonathan Frech - redid the for loop to knock a few bytes off. Better way of appending items to the list

Welcome to PPCG! Not sure how you counted bytes, but I'm getting only 283. Less if that indent is a tab instead of 4 bytes.

Thanks! I just did a char count, guess I used the wrong tool. Updated!

Doesn't the i in range(x[1], x[2]) exclude the upper edge of the heat, unlike in the specification?

Ahh yep, damn. I updated the code and shuffled it around a bit - managed to keep the byte count. Changed it to take user input - removes need for indenting.

270 bytes.

Could this be any help? p,d="Gas Giant,Ice,Ice Giant,Gaia class,Dense Atmosphere,Desert,Iron,Lava".split(","),[ord(i)-10 for i in"#"] d=[[p[x//3]]+d[x:x+3]for x in range(0,len(d),3)]

@JonathFrech  - thanks! redid answer, also managed to shave a few bytes by removing "in range" statement

@MustacheMoses - I'm afraid I don't understand your code, going to keep looking at it though

@Chromane Apologies it seems that the comments stripped some characters.

Octave with Statistics Package, 178 176 174 158  bytes
@(h)randsample(strsplit('Gas Giant,Ice,Ice Giant,Gaia class,Dense Atmosphere,Desert,Iron,Lava',','),1,1,('UPPPP_TL'-70).*(h>'IIIJLLLO'-70&h<'PMMNPQQR'-70)){1}

The code defines an anonymous function that inputs a number and outputs a string.
Try it online!
Explanation
The code
@(h)

defines an anonymous function with input h.
The string
'Gas Giant,Ice,Ice Giant,Gaia class,Dense Atmosphere,Desert,Iron,Lava'

is split at commas using
strsplit(...,',')

The result is a cell array of strings, where each string is a planet class.
The code
'IIIJLLLO'-70

defines the shown string and subtracts 70 from the code points of its chars. This gives the array of minimum heat values minus 1, that is,  [3 3 3 4 6 6 6 9].
Similarly,
'PMMNPQQR'-70

produces the array of maximum heat values plus 1, that is, [10 7 7 8 10 11 11 12].
The comparisons
h>...&h<...

give an array containing true or false indicating which planet classes are possible.
On the other hand,
'UPPPP_TL'-70

defines the array of random chance values, [15 10 10 10 10 25 14 6].
The operation
(...).*(...)

is the element-wise multiplication of the latter two arrays (true and false behave like 0 and 1 respectively). This gives an array where each planet class has either its random chance, or 0 if that class is not possible based on the input. This array will be used as weights in the random sampling
The function call
randsample(...,1,1,...)

selects one of the cells from the cell array of strings (first input argument), using the computed array of weights (fourth input argument). Specifically, the function randsample automatically normalizes the weights to probabilities, and then does the random selection with those probabilities. The result is a cell array containing a string. The code
{1}

is used to extract that string, which constitutes the function output.

Great explanation, thanks. Great score too.

Python 3, 263 bytes
from random import*
P=lambda h:"Gas Giant|Ice|Ice Giant|Gaia class|Dense Atmosphere|Desert|Iron|Lava".split("|")[choices(*list(zip(*filter(lambda x:h in range(*x[2:]),zip(*[[int(x,32)for x in"0f4a1a472a473a584a7a5p7b6e7b76ac"][a::4]for a in(0,1,2,3)]))))[:2])[0]]

Try it online!

Python 3, 199 194 bytes
from random import*
lambda n:choices("Ice|Ice Giant|Gas Giant|Gaia class|Dense Atmosphere|Desert|Iron|Lava".split('|'),[(0x33b2a53d4a>>5*i&31)*(0xc07878380e3f0707>>8*i+n-4&1)for i in range(8)])

Splitting h into separate bit masks and random chance values (see explanation) saves a few bytes by eliminating an assignment to h and simplifying the range() in the list comprehension.
Previous solution
from random import*
h=0xc033c39e3270a0e51fbc1d40ea
lambda n:choices("Ice|Ice Giant|Gas Giant|Gaia class|Dense Atmosphere|Desert|Iron|Lava".split('|'),[(h>>i&31)*(h>>i+n+1&1)for i in range(0,104,13)])

Defines an anonymous function that takes an int and returns the planet type.
For each planet type, a 13-bit value was calculated.  The top 8 bits define a bit mask of valid heat values for that planet type.  The bottom 5 bits are the random chance for that planet type.  For example, "Gaia class" is a valid type for heat values 4 to 7, so it has a mask of 0b00001111.  It has a random chance of 10, or 0b01010.  Combining them results it the 13-bit value 0b0000111101010 for the "Gaia class" type.  The 13-bit values for each planet type are concatenated to get the value for h (the lowest 13 bits are for the "Ice" planet type). (The newer answer doesn't combine these values).
The list comprehension iterates over the 13-bit values to create a list of weights, where the weight is the random chance if the planet type is a valid choice for the given heat value, and zero otherwise.  For each planet type, (h>>i&31) extracts the random chance for that planet type. (h>>i+n+1&1) evaluates to 1 if the planet type is a valid choice for the heat value n and evaluates to 0 otherwise.
The library function random.choices(choices, weights) selects an item from the list of choices based on the list of weights.

i+n+1 can be i-~n. TIO

Ruby, 214 193 189 bytes
->h{'Gas Giant,Desert,Iron,Lava,Ice,Ice Giant,Gaia class,Dense Atmosphere'.split(?,).zip(31006330.digits,75449887.digits,[15,25,14,6]).flat_map{|n,m,x,r|m<h-3&&x>h-3?[n]*(r||10):[]}.sample}

Try it online!

Sorry, I don't get the output, would it be the first item in the list?

@Absinthe I added some headings, check again. It's all the heat levels from 4 to 11 and a randomly generated planet for each

Ah I get it thanks, though ideally there should only be one string output

@Absinthe You're right, that was just my own test code, now you can input the heat value you want and it returns 1 result

Perl 5 (-p), 230 bytes
@a=(['Gas Giant',4,9,15],[Ice,4,6,10],['Ice Giant',4,6,10],['Gaia class',5,7,10],['Dense Atmosphere',7,9,10],[Desert,7,10,25],[Iron,7,10,14],[Lava,10,11,6]);//;map{push@b,($$_[0])x($$_[3]*($$_[1]<=$'&&$'<=$$_[2]))}@a;$_=$b[rand@b]

Try it online!

If you remove one to the min heats and add one to the max heats (that would give [Ice,4,5,11] instead of [Ice,4,6,10], etc) then you'll be able to use < instead of <= and > instead of >=, thus saving 2 bytes. (yea, that's not a lot...)

Nim, 314 298 294 bytes
import random,sequtils
proc c(h:int)=
 var a= @[""]
 a.del 0
 for n in[("Gas Giant",4,9,15),("Ice",4,6,10),("Ice Giant",4,6,10),("Gaia Class",5,7,10),("Dense Atmosphere",7,9,10),("Desert",7,10,25),("Iron",7,10,14),("Lava",10,11,6)]:(if h>=n[1]and h<=n[2]:a.add repeat(n[0],n[3]))
 echo random a

For loop now in one line, no return, less bytes to implicit type
4 spaces removed (thanks Kevin)
Try it online!

I've never programmed in Nim, but I think you can golf four spaces: one at for n in[(; and three at if h>=n[1]and h<=n[2].

05AB1E, 78 76 bytes
”Œï²°™Ä²° Gaia classêÎ·•™Äµ‰Ÿ± Lava”#8äðýā<•ŒEŽuS,•2ô×•9èÁnÇ∞Λ•SÌ2ôεŸIå}ÏSΩè

Try it online!
Explanation
”Œï²°™Ä²° Gaia classêÎ·•™Äµ‰Ÿ± Lava”
pushes the string Gas Giant Ice Giant Gaia class Dense Atmosphere Ice Desert Iron Lava
#                                          # split on spaces
 8ä                                        # divide into 8 parts
   ðý                                      # join each by spaces
     ā<                                    # push the range [0 ... 7]
       •ŒEŽuS,•                            # push 151010101025146
               2ô                          # split into pieces of 2
                                           # results in [15, 10, 10, 10, 10, 25, 14, 6]
                 ×                         # repeat each number in the range by these amounts
                                           # results in ['000000000000000', '1111111111', '2222222222', '3333333333', '4444444444', '5555555555555555555555555', '66666666666666', '777777']
                  •9èÁnÇ∞Λ•                # push 2724355724585889
                           S               # split to list of digits
                            Ì              # decrement each twice
                                           # results in [4,9,4,6,5,7,7,9,4,6,7,10,7,10,10,11]
                             2ô            # split into pieces of 2
                                           # results in [[4, 9], [4, 6], [5, 7], [7, 9], [4, 6], [7, 10], [7, 10], [10, 11]]
                               εŸIå}       # apply to each pair
                                Ÿ          # range [a ... b]
                                 Iå        # check if input is contained in the range
                                           # ex, for input 10: [0, 0, 0, 0, 0, 1, 1, 1]
                                    Ï      # keep only the indices which are true
                                           # ex, for input 10: ['5555555555555555555555555', '66666666666666', '777777']
                                     S     # split to list of digits
                                      Ω    # pick one at random
                                       è   # index into the list of strings with this

Haskell, 377 364 358 318 312 270 265 262 256 251 bytes
import System.Random
f h|x<-[n|(n,(a,b,c))<-zip(lines"Gas Giant\nIce\nIce Giant\nGaia class\nDense Atmosphere\n
Desert\nIron\nLava")$zip3[4,4,4,5,7,7,7,10][9,6,6,7,9,10,10,11][15,10,10,10,10,25,14,6],h<=
b,h>=a,_<-[1..c]]=(x!!)<$>randomRIO(0,length x-1)

(I've added linebreaks for nicer printout). The task says "return", not "print", so f is a function which returns the randomly selected planet name into the IO monad, f :: Int -> IO String.
The main is main = do {f 10 >>= print} (Haskell golfing tips says it doesn't count). Prints

"Iron"     -- or "Desert", or "Lava"

(edits: removed &'s base case; moved main out; changed to quadruples and unzip, and switched to pattern guards and >>= following suggestions from Laikoni, thanks!;  implemented the approach from the Jelly solution instead, repeating the names; explicit type is no longer needed; another advice by Laikoni saves 3 more bytes; made it an IO function; implemented advice from the chat room).
Try it online!

Nice! To avoid flooding the comments, you could join the Haskell chat room Of Monads and Men to further discuss your answer.

Min, 280 277 bytes
:a ' =b (("Gas Giant" 4 9 15) ("Ice" 4 6 10) ("Ice Giant" 4 6 10) ("Gaia Class" 5 7 10) ("Dense Atmosphere" 7 9 10) ("Desert" 7 10 25) ("Iron" 7 10 14) ("Lava" 10 11 6)) (=n (a n 1 get >= a n 2 get <= and) ((n 0 get b append #b) n 3 get times) when) foreach b b size random get

Starts with heat on the stack, leaves a string on the stack. Same general process as Python 2 answer.
Explanation
Note that min is concatenative
:a ' =b                               ;Set the value on the stack (heat) to a, set empty quot to b
(("Gas Giant" 4 9 15) ("Ice" 4 6 10) ("Ice Giant" 4 6 10) ("Gaia Class" 5 7 10) ("Dense Atmosphere" 7 9 10) ("Desert" 7 10 25) ("Iron" 7 10 14) ("Lava" 10 11 6)) ;Data to be iterated over
(=n                                   ;  set n to current item
 (a n 1 get >= a n 2 get <= and)      ;    check if n is between the min (2nd elment of n) and max (3rd element of n) heat
 (
  (n 0 get b append #b) n 3 get times ;      insert the name(1st element of n) into the quot of names (b) a number of times corresponding to the 4th element of n
 ) when                               ;    when the previous check is true
) foreach                             ;  for every quot in previous data
b b size random get                   ;choose a random element from the list of names

Java 8, 398 384 bytes
n->{String r="",a[];for(String x:"456789~Gas Giant~15;456~Ice~10;456~Ice Giant~10;567~Gaia class~10;789~Dense Atmosphere~10;78910~Desert~25;78910~Iron~14;1011~Lava~6".split(";"))if(x.split("~")[0].contains(n))r+=x+";";long t=0,u=0;for(String x:(a=r.split(";")))t+=new Long(x.split("~")[2]);t*=Math.random();for(String x:a)if((u+=new Long((a=x.split("~"))[2]))>t)return a[1];return"";}

It can definitely be golfed some more, but the probability in combination with the Strings isn't very easy in Java.
Explanation:
Try it online.
n->{                // Method with String as both parameter and return-type
  String r="",      //  Temp-String, starting empty
         a[];       //  Temp String-array
  for(String x:"456789~Gas Giant~15;456~Ice~10;456~Ice Giant~10;567~Gaia class~10;789~Dense Atmosphere~10;78910~Desert~25;78910~Iron~14;1011~Lava~6".split(";"))
                    //  Loop over the String-parts in the format "heats~type~probability"
    if(x.split("~")[0].contains(n))
                    //   If the heats contains the input
      r+=x+";";     //    Append this entire String-part to the temp-String `r`
  long t=0,u=0;     //  Temp numbers, both starting empty
  for(String x:(a=r.split(";")))
                    //  Loop over the temp-String parts:
    t+=new Long(x.split("~")[2]);
                    //   Sum their probabilities
  t*=Math.random(); //  Get a random number in the range [0,sum_of_probabilities)
  for(String x:a)   //  Loop over the temp-String parts again
    if((u+=new Long((a=x.split("~"))[2]))>t)
                    //   The moment the current probability-sum is > the random number
      return a[1];  //    Return the Type of planet
  return"";}        //  Mandatory return we won't encounter (which returns nothing)

PowerShell, 56 + 135 (CSV file) + 1 (file name) = 192 bytes
param($z)ipcsv a|?{$z-in$_.m..$_.x}|%{,$_.p*$_.r}|Random

Try it online! (this is a slightly modified version that creates the temporary CSV file described below)
Imports a CSV file using ipcsv (short for Import-CSV) named a in the local directory that contains the following:
P,m,x,r
Gas Giant,4,9,15
Ice,4,6,10
Ice Giant,4,6,10
Gaia class,5,7,10
Dense Atmosphere,7,9,10
Desert,7,10,25
Iron,7,10,14
Lava,10,11,6

That automatically creates an iterable hashtable of things like the following:
@{P=Gas Giant; m=4; x=9; r=15}
@{P=Ice; m=4; x=6; r=10}
...

We then use Where-Object (?) to pull out those entries where our input integer $z is -in the range $_.m to $_.x (i.e., it's in the heat range). We then pump those into a Foreach-Object loop (%) that creates an array of strings of names based on the random chance of those names. For example, this will create an array of 15 "Gas Giant" strings if that heat matches. We then put those into Get-Random which will pull out the appropriate string with the appropriate weighting.


text:
Continued Fraction of Digit-wise Sum of Square Roots
Introduction
Your task is to generate the first 1000 terms in the continued fraction representation of digit-wise sum of square root of 2 and square root of 3.
In other words, produce exactly the following list (but the output format is flexible)
[2, 6, 1, 5, 7, 2, 4, 4, 1, 11, 68, 17, 1, 19, 5, 6, 1, 5, 3, 2, 1, 2, 3, 21, 1, 2, 1, 2, 2, 9, 8, 1, 1, 1, 1, 6, 2, 1, 4, 1, 1, 2, 3, 7, 1, 4, 1, 7, 1, 1, 4, 22, 1, 1, 3, 1, 2, 1, 1, 1, 7, 2, 7, 2, 1, 3, 14, 1, 4, 1, 1, 1, 15, 1, 91, 3, 1, 1, 1, 8, 6, 1, 1, 1, 1, 3, 1, 2, 58, 1, 8, 1, 5, 2, 5, 2, 1, 1, 7, 2, 3, 3, 22, 5, 3, 3, 1, 9, 1, 2, 2, 1, 7, 5, 2, 3, 10, 2, 3, 3, 4, 94, 211, 3, 2, 173, 2, 1, 2, 1, 14, 4, 1, 11, 6, 1, 4, 1, 1, 62330, 1, 17, 1, 5, 2, 5, 5, 1, 9, 3, 1, 2, 1, 5, 1, 1, 1, 11, 8, 5, 12, 3, 2, 1, 8, 6, 1, 3, 1, 3, 1, 2, 1, 78, 1, 3, 2, 442, 1, 7, 3, 1, 2, 3, 1, 3, 2, 9, 1, 6, 1, 2, 2, 2, 5, 2, 1, 1, 1, 6, 2, 3, 3, 2, 2, 5, 2, 2, 1, 2, 1, 1, 9, 4, 4, 1, 3, 1, 1, 1, 1, 5, 1, 1, 4, 12, 1, 1, 1, 4, 2, 15, 1, 2, 1, 3, 2, 2, 3, 2, 1, 1, 13, 11, 1, 23, 1, 1, 1, 13, 4, 1, 11, 1, 1, 2, 3, 14, 1, 774, 1, 3, 1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 1, 1, 8, 1, 3, 10, 2, 7, 2, 2, 1, 1, 1, 2, 2, 1, 11, 1, 2, 5, 1, 4, 1, 4, 1, 16, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 8, 1, 2, 1, 1, 22, 3, 1, 8, 1, 1, 1, 1, 1, 9, 1, 1, 4, 1, 2, 1, 2, 3, 5, 1, 3, 1, 77, 1, 7, 1, 1, 1, 1, 2, 1, 1, 27, 16, 2, 1, 10, 1, 1, 5, 1, 6, 2, 1, 4, 14, 33, 1, 2, 1, 1, 1, 2, 1, 1, 1, 29, 2, 5, 3, 7, 1, 471, 1, 50, 5, 3, 1, 1, 3, 1, 3, 36, 15, 1, 29, 2, 1, 2, 9, 5, 1, 2, 1, 1, 1, 1, 2, 15, 1, 22, 1, 1, 2, 7, 1, 5, 9, 3, 1, 3, 2, 2, 1, 8, 3, 1, 2, 4, 1, 2, 6, 1, 6, 1, 1, 1, 1, 1, 5, 7, 64, 2, 1, 1, 1, 1, 120, 1, 4, 2, 7, 3, 5, 1, 1, 7, 1, 3, 2, 3, 13, 2, 2, 2, 1, 43, 2, 3, 3, 1, 2, 4, 14, 2, 2, 1, 22, 4, 2, 12, 1, 9, 2, 6, 10, 4, 9, 1, 2, 6, 1, 1, 1, 14, 1, 22, 1, 2, 1, 1, 1, 1, 118, 1, 16, 1, 1, 14, 2, 24, 1, 1, 2, 11, 1, 6, 2, 1, 2, 1, 1, 3, 6, 1, 2, 2, 7, 1, 12, 71, 3, 2, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 3, 5, 5, 1, 1, 1, 1, 4, 1, 1, 1, 3, 1, 4, 2, 19, 1, 16, 2, 15, 1, 1, 3, 2, 3, 2, 4, 1, 3, 1, 1, 7, 1, 2, 2, 117, 2, 2, 8, 2, 1, 5, 1, 3, 12, 1, 10, 1, 4, 1, 1, 2, 1, 5, 2, 33, 1, 1, 1, 1, 1, 18, 1, 1, 1, 4, 236, 1, 11, 4, 1, 1, 11, 13, 1, 1, 5, 1, 3, 2, 2, 3, 3, 7, 1, 2, 8, 5, 14, 1, 1, 2, 6, 7, 1, 1, 6, 14, 22, 8, 38, 4, 6, 1, 1, 1, 1, 7, 1, 1, 20, 2, 28, 4, 1, 1, 4, 2, 2, 1, 1, 2, 3, 1, 13, 1, 2, 5, 1, 4, 1, 3, 1, 1, 2, 408, 1, 29, 1, 6, 67, 1, 6, 251, 1, 2, 1, 1, 1, 8, 13, 1, 1, 1, 15, 1, 16, 23, 12, 1, 3, 5, 20, 16, 4, 2, 1, 8, 1, 2, 2, 6, 1, 2, 4, 1, 9, 1, 7, 1, 1, 1, 64, 10, 1, 1, 2, 1, 8, 2, 1, 5, 4, 2, 5, 6, 7, 1, 2, 1, 2, 2, 1, 4, 11, 1, 1, 4, 1, 714, 6, 3, 10, 2, 1, 6, 36, 1, 1, 1, 1, 10, 2, 1, 1, 1, 3, 2, 1, 6, 1, 8, 1, 1, 1, 1, 1, 1, 1, 2, 40, 1, 1, 1, 5, 1, 3, 24, 2, 1, 6, 2, 1, 1, 1, 7, 5, 2, 1, 2, 1, 6, 1, 1, 9, 1, 2, 7, 6, 2, 1, 1, 1, 2, 1, 12, 1, 20, 7, 3, 1, 10, 1, 8, 1, 3, 1, 1, 1, 1, 2, 1, 1, 6, 1, 2, 1, 5, 1, 1, 1, 5, 12, 1, 2, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, 8, 2, 4, 1, 3, 1, 1, 1, 2, 1, 11, 3, 2, 1, 7, 18, 1, 1, 17, 1, 1, 7, 4, 6, 2, 5, 6, 4, 4, 2, 1, 6, 20, 1, 45, 5, 6, 1, 1, 3, 2, 3, 3, 19, 1, 1, 1, 1, 1, 1, 34, 1, 1, 3, 2, 1, 1, 1, 1, 1, 4, 1, 2, 1, 312, 2, 1, 1, 1, 3, 6, 6, 1, 2, 25, 14, 281, 4, 1, 37, 582, 3, 20, 2, 1, 1, 1, 2, 1, 3, 7, 8, 4, 1, 11, 2, 3, 183, 2, 23, 8, 72, 2, 2, 3, 8, 7, 1, 4, 1, 4, 1, 2, 2, 1, 2, 1, 8, 2, 4, 1, 2, 1, 2, 1, 1, 2, 1, 1, 10, 2, 1, 1, 5, 2, 1, 1, 1, 2, 1, 1, 2, 1, 3, 2, 9]

Challenge
The following general introduction to continued fraction is taken from the challenge Simplify a Continued Fraction.

Continued fractions are expressions that describe fractions
  iteratively. They can be represented graphically:

Or they can be represented as a list of values: [a0, a1, a2, a3, ... an]

This challenge is to find out the continued fraction of the digit-wise sum of sqrt(2) and sqrt(3), the digit-wise sum is defined as follows,
Take the digits in the decimal representation of sqrt(2) and sqrt(3), and obtain the sum digit by digit:
    1.  4  1  4  2  1  3  5  6  2  3 ...
+   1.  7  3  2  0  5  0  8  0  7  5 ...
=   2. 11  4  6  2  6  3 13  6  9  8 ...

Then only keep the last digit of the sum and compile them back to the decimal representation of a real number
    1.  4  1  4  2  1  3  5  6  2  3 ...
+   1.  7  3  2  0  5  0  8  0  7  5 ...
=   2. 11  4  6  2  6  3 13  6  9  8 ...
->  2.  1  4  6  2  6  3  3  6  9  8 ...

The digit-wise sum of sqrt(2) and sqrt(3) is therefore 2.1462633698..., and when it is expressed with continued fraction, the first 1000 values (i.e. a0 to a999) obtained are the ones listed in the introduction section.
Specs

You may write a function or a full program. Neither should take inputs. In other words, the function or the program should work properly with no inputs. It doesn't matter what the function or program does if non-empty input is provided.
You should output to STDOUT. Only if your language does not support outputting to STDOUT should you use the closest equivalent in your language.
You don't need to keep STDERR clean, and stopping the program by error is allowed as long as the required output is made in STDOUT or its equivalents.
You can provide output through any standard form.
This is code-golf, the lowest number of bytes wins.
As usual, default loopholes apply here.

Python 2, 193 ... 179 178 bytes
d=10
u=d**2000
v=u*u
def s(n,a=d,i=9):
 while a-i:i,a=a,(a+n/a)/2
 return a
p,q,r,t=s(2*v),s(3*v),1,0
while p:t+=(p+q)%d*r;p/=d;q/=d;r*=d
for i in range(1000):print t/u;t=v/(t%u)

Try it online!
Calculating sqrt(2) and sqrt(3) to such a precision with a short code is a tough job in Python and other languages.
2000 digits is needed to ensure the expansion is correct (1020 suffices, but I'm not going to modify it because no improvement), and lines 4-6 is the integer square root.
193 > 180 : The digit-wise modulo sum is now carried by a loop instead of array manipulation
180 > 179 : Replaced the 6 occurrences of 10 using d with the cost of defining with 5 bytes, cutting 1 byte in total
179 > 178 : Just realized that a!=i can be replaced by a-i

Kotlin 1.1 script, 304 293 bytes
import java.math.BigDecimal as b
import java.math.*
val m=MathContext(1022)
var B=b(2)
var A=b((""+B.sqrt(m)).zip(""+b(3).sqrt(m)).joinToString(""){(a,b)->if(a=='.')".";else ""+(a-'0'+(b-'0'))%10})
val g=b(1).setScale(1022)
repeat(1000){println(B);A=g/(A-B);B=A.setScale(0,RoundingMode.FLOOR)}

A bit verbose unfortunately :/
Must be run with JDK 9, as sqrt was added to BigDecimal in this release. Interestingly, I couldn't find a TIO site with both Kotlin 1.1 and JDK 9 features (Ideone and repl.it both run Kotlin 1.0, which did not support destructuring in lambdas, and TIO complains that sqrt does not exist.)
Prints each element separated by a newline.
Edit (-11): moved println to the beginning of the loop body and added an additional iteration to avoid repeating the method call. An extra calculation is done, but it is not used for anything.

Haskell 207 bytes
I Couldn't find an easy way to compute the continued fraction lazilly, so I worked as well with 2000 digits.
import Data.Ratio
r#y|x<-[x|x<-[9,8..],r>(y+x)*x]!!0=x:(100*(r-(y+x)*x))#(10*y+20*x)
c r|z<-floor r=z:c(1/(r-z%1))
main=print.take 1000.c$foldl1((+).(10*))(take 2000$(`mod`10)<$>zipWith(+)(3#0)(2#0))%10^1999

What a pity! I was expecting to see a Haskell answer that generates the infinite list and evaluate it lazily ...

@WeijunZhou I will give it a try later when I have some time. At least sqrt generates infinite list. I just need to figure out how to invert decimal number written as infinte list. Maybe someone can help

Jelly, 32 bytes
ȷ*`
%¢¢²¤:
2,3×Ñ×ÑÆ½DS%⁵ḌÇȷÐ¡Ṗ:Ñ

Try it online!

Basically use fixed-point arithmetic. M may work better here, but somehow floor(HUGE_NUMBER × sqrt(2) doesn't want to evaluate for too large HUGE_NUMBER. Anyway the fixed-point division is definitely better.

Explanation:
-------
ȷ*`       Calculate the base for fixed-point arithmetic.
ȷ         Number 1000.
 *        Raise to the power of...
  `       self. (so we have 1000 ** 1000 == 1e3000) Let B=1e3000.

-------
%¢¢²¤:    Given f × B, return a number approximately (1/frac(f)) × B.
          Current value: f × B.
%¢        Modulo by B. Current value: frac(f) × B.
  ¢²¤     B² (that is, 1e6000)
     :    integer-divide by. So we get B²/(frac(f)×B) ≃ 1/frac(f) × B.

-------
2,3×Ñ×ÑÆ½DS%⁵ḌÇȷÐ¡Ṗ:Ñ  Main link.
2,3                    The list [2,3].

    Ñ                  This refers to the next link as a monad, which is the
                       first link (as Jelly links wraparound)
   ×                   Multiply by. So we get [2,3]×1e3000 = [2e3000,3e3000]
     ×Ñ                Again. Current value = [2e6000,3e6000] = [2B²,3B²]

       Æ½              Integer square root.
                       Current value ≃ [sqrt(2B²),sqrt(3B²)]
                                     = [B sqrt(2),B sqrt(3)]

         DS            Decimal digits, and sum together.
           %⁵          Modulo 10.
             Ḍ         Convert back from decimal digits to integer.

                Ð¡     Repeatedly apply...
              Ç          the last link...
               ȷ         for 1000 times, collecting the intermediate results.
                  Ṗ    Pop, discard the last result.
                   :Ñ  Integer divide everything by B.

Unfortunately ×⁺Ñ doesn't work. Alternatively ×Ñ²$.

Upvoted. Explanation would be much appreciated.

@WeijunZhou Done, tell me if you don't understand something.

Deadfish~, 15503 bytes
{iiiii}c{dd}iic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}iiic{dd}dddc{ii}ddc{dd}iic{ii}c{dd}c{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}iiciic{dd}ddddc{ii}dddciiiiiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{i}ddc{dd}dddddc{ii}ic{dd}dc{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}ddcdc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}iiiiic{dd}dddddc{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}ddcc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}ddc{dd}iic{ii}iiic{dd}dddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddciiic{dd}c{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciiiic{dd}dc{ii}dddc{dd}iiic{ii}iiiiic{d}iic{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iciiic{dd}ddddc{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dc{dd}ic{ii}ddcc{dd}iic{ii}ic{dd}dc{ii}dc{dd}ic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}ic{dd}dc{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dddcdc{d}ddddddc{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dc{dd}ic{ii}c{dd}c{ii}iiiiicdddddc{dd}c{ii}ddcdcc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddciiiiiicddddc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddciiic{dd}c{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iicddddciccdddc{d}ddddddc{ii}dddc{dd}iiic{ii}dddciiiiiic{dd}dddc{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}ic{dd}dc{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}iiiic{dd}ddddc{ii}ic{dd}dc{ii}dddcic{dd}iic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiicic{dd}ddddc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}ccddc{dd}iic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}c{dd}c{ii}c{dd}c{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddcic{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}ddc{dd}iic{ii}dddciiiic{dd}dc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciic{dd}ic{ii}dddcc{dd}iiic{ii}dddc{dd}iiic{ii}ddcic{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciic{dd}ic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dddciiic{dd}c{ii}dddc{dd}iiic{ii}iiiccdddc{dd}c{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddcdc{d}ddddddc{ii}ddc{dd}iic{ii}iiic{dd}dddc{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddciiiiic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddcc{dd}iic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}iiicc{dd}dddc{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddciiiiic{dd}dddc{ii}dddciiiiic{dd}ddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddcdc{d}ddddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddciiic{dd}c{ii}dcc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{i}dddc{dd}dddddc{ii}ddc{dd}iic{ii}ic{dd}dc{ii}dc{dd}ic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}ciiicddddddc{dd}iiic{ii}dddc{dd}iiic{ii}icdddddc{d}ddddddc{ii}ic{dd}dc{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dciiic{dd}ddc{ii}dddciiiic{dd}dc{ii}dddc{dd}iiic{ii}ddc{i}dddc{dd}dddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iiiiic{dd}dddddc{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddciiiic{dd}dc{ii}dddc{dd}iiic{ii}ddcc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}iiiiic{dd}dddddc{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}c{dd}c{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}iiic{dd}dddc{ii}iicddc{dd}c{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddcicddc{d}ddddddc{ii}dddc{dd}iiic{ii}c{dd}c{ii}ddc{dd}iic{ii}iiic{dd}dddc{ii}dc{dd}ic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dddciic{dd}ic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}cdc{dd}ic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}c{dd}c{ii}dddciiic{dd}c{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddcc{dd}iic{ii}c{dd}c{ii}ddc{dd}iic{ii}dddcic{dd}iic{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}ddc{dd}iic{ii}iic{dd}ddc{ii}dddcdc{d}ddddddc{ii}c{dd}c{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciiic{dd}c{ii}dddc{dd}iiic{ii}ddcc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddcc{i}dddc{dd}ddddc{ii}dddc{dd}iiic{ii}dddciiiiic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciiic{dd}c{ii}ddc{dd}iic{ii}ddciic{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddcc{dd}iiic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dddcic{dd}iic{ii}iiicddddddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ic{dd}dc{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}c{dd}c{ii}ddc{dd}iic{ii}dddc{i}ddc{dd}dddddc{ii}dddc{dd}iiic{ii}dddciiiiic{dd}ddc{ii}ddc{dd}iic{ii}dddciiiic{dd}dc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddcciiiiiic{dd}dddc{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}iiiic{dd}ddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddcic{dd}iic{ii}dddc{dd}iiic{ii}dddcdc{d}ddddddc{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}dcc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{i}dddc{dd}ddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}ddciciiic{dd}ddc{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}dddciic{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dc{dd}ic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iiiic{dd}ddddc{ii}ic{dd}dc{ii}dddciiic{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iic{dd}ddc{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dddciiic{dd}c{ii}ddcc{dd}iic{ii}iiiic{dd}ddddc{ii}dciiiiic{dd}ddddc{ii}c{dd}c{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddcddc{d}ddddddc{ii}ddc{dd}iic{ii}ddciiiiiic{dd}ddddc{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddciic{dd}ic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}cddddc{i}ddc{dd}ddddc{ii}dddc{dd}iiic{ii}ddc{i}dddc{dd}dddddc{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}iicic{dd}dddc{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddciiicddddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddciic{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciiiic{dd}dc{ii}dddc{dd}iiic{ii}dddciiiiic{dd}ddc{ii}ddcic{dd}ic{ii}dddcic{dd}iic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ic{dd}dc{ii}ddcddc{d}ddddddc{ii}dddciiiiic{dd}ddc{ii}c{dd}c{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}c{dd}c{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iicddc{dd}c{ii}dddcdc{d}ddddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}c{dd}c{ii}ddc{dd}iic{ii}ic{dd}dc{ii}iic{dd}ddc{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddcc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}iiicddddddciiic{dd}c{ii}iic{dd}ddc{ii}dc{dd}ic{ii}dddcdc{d}ddddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dciiic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddcdc{d}ddddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}cddddc{d}ddddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddciic{dd}c{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}ic{dd}dc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiiic{dd}dddddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}iiic{dd}dddc{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddcic{dd}iic{ii}dddc{dd}iiic{ii}ddcddc{d}ddddddc{ii}iiic{dd}dddc{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddcdc{d}ddddddc{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}dddcic{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}ddc{dd}iic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}dddc{i}dddc{dd}ddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddciiiiiic{dd}dddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}iiic{dd}dddc{ii}c{dd}c{ii}iic{dd}ddc{ii}ddc{dd}iic{ii}ic{dd}dc{ii}iic{dd}ddc{ii}c{dd}c{ii}c{dd}c{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iic{dd}ddc{ii}ddcddc{d}ddddddc{ii}dddc{dd}iiic{ii}cic{dd}dc{ii}ic{dd}dc{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dc{dd}ic{ii}dddc{i}ddc{dd}dddddc{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dcic{dd}c{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dcddcic{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}iic{dd}ddc{ii}iic{dd}ddc{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddciiic{dd}dc{ii}dddciiic{dd}c{ii}ddciiiiiic{d}iiic{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}dciiiic{dd}dddc{ii}iciiicddddddc{dd}iic{ii}dc{dd}ic{ii}ddcddc{d}ddddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}iiic{dd}dddc{ii}iiiic{dd}ddddc{ii}c{dd}c{ii}dddc{dd}iiic{ii}dddcc{dd}iiic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}dddc{i}dddcdddddc{dd}ic{ii}ddc{dd}iic{ii}ddcic{dd}ic{ii}iiiic{dd}ddddc{ii}iiicdddddc{dd}iic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dc{dd}ic{ii}iiiic{dd}ddddc{ii}iiic{dd}dddc{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}c{dd}c{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}iiiic{dd}ddddc{ii}ddc{dd}iic{ii}c{dd}c{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddcdc{d}ddddddc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ic{dd}dc{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dddc{dd}iiic{ii}ddc{dd}iic{ii}dddc{dd}iiic{ii}dc{dd}ic{ii}ddc{dd}iic{ii}iiiiic

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
We do tower hopping
Task
Given an array of non-negative integers a, determine the minimum number of rightward jumps required to jump "outside" the array, starting at position 0, or return zero/null if it is not possible to do so.
A jump from index i is defined to be an increase in array index by at most a[i].
A jump outside is a jump where the index resulting from the jump i is out-of-bounds for the array, so for 1-based indexing i>length(a), and for 0-based indexing, i>=length(a).
Example 1
Consider Array = [4,0,2,0,2,0]:
Array[0] = 4 -> You can jump 4 field
Array[1] = 0 -> You can jump 0 field
Array[2] = 2 -> You can jump 2 field
Array[3] = 0 -> You can jump 0 field
Array[4] = 2 -> You can jump 2 field
Array[5] = 0 -> You can jump 0 field

The shortest path by "jumping" to go out-of-bounds has length 2:
We could jump from 0->2->4->outside which has length 3 but 0->4->outside has length 2 so we return 2.
Example 2
Suppose Array=[0,1,2,3,2,1]:
Array[0] = 0 -> You can jump 0 fields
Array[1] = 1 -> You can jump 1 field
Array[2] = 2 -> You can jump 2 field
Array[3] = 3 -> You can jump 3 field
Array[4] = 2 -> You can jump 2 field
Array[5] = 1 -> You can jump 1 field

In this case, it is impossible to jump outside the array, so we should return a zero/null or any non deterministic value like ∞.
Example 3
Suppose Array=[4]:
Array[0] = 4 -> You can jump 4 field

We can directly jump from index 0 outside of the array, with just one jump, so we return 1.
Edit:
Due to multiple questions about the return value:
Returning ∞ is totally valid, if there is no chance to escape.
Because, if there is a chance, we can define that number.
This is code-golf, so the shortest code in bytes wins!

What do you mean by "if you can jump outside of the Collection with a minimum of jumps!"?

@HyperNeutrino is this troll or you really don't get it?
Check Example #2. It has 2 Solutions, with 2 or 3 Jumps, option with 2 Jumps would be the right.

I really don't get what a minimum of jumps is... it suggests to me that there's meant to be a number of jumps such that if you can't escape the collection in fewer jumps than that it should return false, but the examples mention nothing about that.

Also, please add more test cases.

I edited your challenge such that the formatting is less confusing and the task can now be more easily understood. Feel free to edit / rollback if you disagree with the changes I've made.

Also, in general, when people ask for clarification or raise suggestions, they're generally not "trolling". I'd suggest you not assume that.

@0x45 whether 2 or 3 jumps, we can escape the array so we return TRUE so I don't quite understand what that is supposed to mean.

@HyperNeutrino We want the most optimal path. Which (according to Example 2) would be Index 0 to Index 4 from index 4 we can jump outside.
This check of best path should be the crux to this task.

But since we're returning true/false, it doesn't matter whether or not we find the best path, just whether or not there is a path...

@Mr.Xcoder Challenge spec says truthy/falsy...

If we cannot escape, you return false, if you took the return list approach, you should return a empty list.

Also, please consider using the sandbox for your challenges! Many of these concerns might have been addressed earlier if you had posted there.

@0x45 wait so if it is escapable return # steps?

@HyperNeutrino well, thats a great idea. I will consider to update it to your suggestion. Stand by-

Related, Related.

@Mr.Xcoder, I totally disagree with your assumption

@0x45 What assumption? The fact that I linked you to some related challenges? I never said duplicate. I am not sure what you mean.

@0x45 please assume good intentions. We are asking these questions not because we're trying to make fun of your challenge. Actually, it's quite the opposite: we're interested in your challenge. Just think about it, why would we ask clarifying questions if we disliked your challenge? We have the downvotes/close votes for that purpose. (And as I see, nobody has downvoted your post!)

I have edited the post to clarify what I think it's now asking; please feel free to roll it back if there's anything you disagree with.

@Giuseppe thanks, i'm not native speaking english.
Your assumptions are correct

@0x45 yep, we totally understand here! we have lots of people posting from all over the world, which is why we have places like the Sandbox to help you edit your challenge in a friendly manner without anyone getting frustrated by something as reasonable as a simple language barrier! :) I really like this challenge and hope it gets lots of good answers!

It would be good to have a test case where greedily jumping the maximum distance at every step is not optimal. For example [2, 3, 1, 1].

@0x45 can we use maxint as a null value?

@0x45 Can we use ∞ as a null value?

@EsolangingFruit ∞ is valid.

@ngn No. So you would say, you could escape the Array with MaxInt Value, eventhough you can't. However, ∞ is valid. See updated question

When you say You can jump 4 fields, do you mean You MUST jump 4 fields, or You can jump UP TO 4 fields?

@Flater up to 4 fields, you gotta make the best decision to escape the array with a minimum of jump. So always the highest isn't necessary the best.

Husk, 9 bytes
Γö→▼Mo₀↓ŀ

Returns Inf when no solution exists.
Try it online!
Explanation
Husk's default return values come in handy here.
Γö→▼Mo₀↓ŀ  Implicit input: a list, say [2,3,1,1]
Γ          Deconstruct into head H = 2 and tail T = [3,1,1]
 ö         and feed them into this function:
        ŀ   Range from 0 to H-1: [0,1]
    Mo      For each element in range,
       ↓    drop that many element from T: [[3,1,1],[1,1]]
      ₀     and call this function recursively on the result: [1,2]
   ▼        Take minimum of the results: 2
  →         and increment: 3

If the input list is empty, then Γ cannot deconstruct it, so it returns the default integer value, 0.
If the first element is 0, then the result of Mo₀↓ŀ is an empty list, on which ▼ returns infinity.

Haskell, 70 58 bytes
f[]=0
f(0:_)=1/0
f(x:s)=minimum[1+f(drop k$x:s)|k<-[1..x]]

Try it online!
EDIT: -12 bytes thanks to @Esolanging Fruit and the OP for deciding to allow infinity!
Returns Infinity when there is no solution which makes the solution a lot simpler. Since we can only move forwards f just looks at the head of the list and drops 1<=k<=x items from the list and recurs. Then we just add 1 to each solution the recursive calls found and take the minimum. If the head is 0 the result will be infinity (since we cannot move there is no solution). Since 1+Infinity==Infinity this result will be carried back to the callers. If the list is empty that means we have left the array so we return a cost of 0.

58 bytes, but only if you allow Infinity as the null value (which the OP hasn't clarified yet).

Actually, OP has now allowed this, so that should be valid.

Python 2, 124 bytes
def f(a):
 i={0};l=len(a)
 for j in range(l):
	for q in{0}|i:
	 if q<l:i|=set(range(q-a[q],q-~a[q]))
	 if max(i)/l:return-~j

Try it online!
-11 bytes thanks to Mr. Xcoder
-12 bytes thanks to Mr. Xcoder and Rod

You failed print(f([4,1,0,4,1,1,1])) You return 3, but should be 2
Like [0] -> [3] -> outside

@0x45 how so... wait, when you jump, do you have to jump as far as possible or anywhere in between?

@Mr.Xcoder oh yeah, duh. also thanks for the -~ trick, forgot about that one.

@HyperNeutrino "A jump from index i is defined to be an increase in array index by at most a[i]."

@MartinEnder oh okay thanks, fixed

@Mr.Xcoder wait that's actually a requirement :/ ok fixed

@HyperNeutrino, you take the most optimal jump to archieve a minimum of jumps to escape the array.

@0x45 ok, thanks for clarifying. I think I fixed it

Looks good... :)

127 bytes by declaring len(a), bitwise and set tricks. Also, why do you need -1<?

126 bytes switch to python2, saving with indentation and replacing >= with /, but loosing in [*i] -> {0}|i and {*range} -> set(range)

@Mr.Xcoder Oh you're right, I don't think it's ever useful. Thanks.

APL (Dyalog Classic) ngn/apl, 18 bytes
EDIT: switched to my own implementation of APL because Dyalog doesn't support infinities and the challenge author doesn't allow finite numbers to act as "null"
⊃⊃{⍵,⍨1+⌊/⍺↑⍵}/⎕,0

Try it online!
try it at ngn/apl's demo page
returns ⌊/⍬
∞ for no solution

What is the "right argument" of ??

This challenge is in desperate need of better test-cases. But your solution is invalid for example 2 3 1 1 should be mapped to 2

@EriktheOutgolfer 0N which is k's integer null; if you're interested, I can explain further in the apl room

@H.PWiz now it can deal with that

Haskell, 45 bytes
(1%)
0%_=1/0
a%(h:t)=min(1+h%t)$(a-1)%t
_%_=0

Try it online!
Outputs Infinity when impossible. The auxiliary left argument to % tracks how many more spaces we can move in our current hop.

Perl 5, 56 53 bytes
Includes +1 for a
perl -aE '1until-@F~~%v?say$n:$n++>map\@v{$_-$F[-$_]..$_},%v,0'  <<< "4 0 2 0 2 0"; echo

Just the code:
#!/usr/bin/perl -a
1until-@F~~%v?say$n:$n++>map\@v{$_-$F[-$_]..$_},%v,0

Try it online!

Perl 5, 80 bytes
sub f{$_[0]>=@_||1+((sort{$a?$b?$a-$b:-1:1}map f(@_[$_..$#_]),1..$_[0])[0]||-1)}

Try it online!

Jelly, 32 bytes
ṛ/ṆȧJ’Ṛ
Rḟ"ÇƤZ$$Tị$Œp+\€Ṁ<Li0ȧ@Ḣ

Try it online!
This is just too long...

Jelly, 19 18 bytes
<LḢ
ḊßÐƤṁḢḟ0‘Ṃµ1Ç?

Try it online!
Explanation
<LḢ  Helper link. Input: array
<    Less than
 L   Length
  Ḣ  Head - Returns 0 if its possible to jump out, else 1

ḊßÐƤṁḢḟ0‘Ṃµ1Ç?  Main link. Input: array
            Ç   Call helper link
             ?  If 0
           1      Return 1
                Else
          µ       Monadic chain
Ḋ                   Dequeue
 ßÐƤ                Recurse on each suffix
     Ḣ              Head of input
    ṁ               Mold, take only that many values
      ḟ0            Filter 0
        ‘           Increment
         Ṃ          Minimum

JavaScript ES6, 118 bytes
(x,g=[[0,0]])=>{while(g.length){if((s=(t=g.shift())[0])>=x.length)return t[1];for(i=0;i++<x[s];)g.push([s+i,t[1]+1])}}

Try it online!
Performs a breadth first search of the array to find the shortest path.

C (gcc), 80 bytes
f(A,l,M,j,r)int*A;{M=~0;for(j=0;l>0&&j++<*A;)if(M<1|M>(r=f(A+j,l-j)))M=r;A=-~M;}

Try it online!

Julia 0.6, 79 bytes
Returns the number of jumps or Inf if you can't escape. Recursively look at the first element and either return Inf or 1 depending on if you can escape, otherwise add 1 to the shortest solution for truncated arrays representing each valid jump. The control flow is done with two ternary statements like test1 ? ontrue1 : test2 ? ontrue2 : onfalse2.

f(a,n=endof(a))=a[1]<1?Inf:a[1]>=n?1:1+minimum(f(a[z:min(z+a[1],n)]) for z=2:n)

Try it online!

Python 2, 83 73 72 bytes
 -10 thanks to @user202729
-1 thanks to @JonathanFrech
lambda a:a and(a[0]and-~min(f(a[k+1:])for k in range(a[0]))or 1e999)or 0

Try it online! Returns infinity for a null value.

and min(...)+1for can be and-~min(...)for.

@JonathanFrech Edited.

C# (.NET Core), 97 bytes
f=l=>{for(int c=l.Count,s=0,j=l[0];j>0;s=f(l.GetRange(j,c-j--)))if(s>0|j>=c)return s+1;return 0;}

Try it online!
Returns 0 if no path was found.
Explanation
f =
    l =>                                      //The list of integers
    {
        for (
            int c = l.Count,                  //The length of the list
                s = 0,                        //Helper to keep track of the steps of the recursion
                j = l[0];                     //The length of the jump, initialize with the first element of the list
                j > 0;                        //Loop while the jump length is not 0
                s = f(l.GetRange(j, c - j--)) //Recursive call of the function with a sub-list stating at the current jump length.
                                              //Then decrement the jumplength.
                                              //Returns the number of steps needed to jump out of the sup-list or 0 if no path was found.
                                              //This is only executed after the first run of the loop body.
            )
        {
            if (j >= c |                      //Check if the current jump lengt gets you out of the list.
                                              //If true return 1 (s is currently 0). OR
                s > 0 )                       //If the recursive call found a solution (s not 0)
                                              //return the number of steps from the recursive call + 1
                return s + 1;
        }
        return 0;                             //If the jump length was 0 return 0
                                              //to indicate that no path was found from the current sub-list.
    }

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Turn Your Program into a Snake!
...or "snakes but not too long".
Inspired by this challenge and this comment.
Task
Write a program or a function that takes no input and outputs its own source code formatted as a snake according
to the rules below:

If your code has any whitespace, it will not be output; it will just be skipped.
There will be one character on each column in the output.
The first character in the code is placed on the first column of line x.
The second character is placed on the second column of either line x, x-1, or x+1. More generally, the nth character (excluding whitespace) goes to the nth column on a line that is one above, one below, or the same as the line on which the previous character went.
The character on the highest line will be on the first line in the output; that is, there are no extraneous leading lines. A single, empty trailing line is allowed.

For example, if the code was from python import snake, the output should look like:
      th
     y  o       s  ke
f  mp    ni po t na
 ro        m  r

or
                    e
                   k
f                 a
 r               n
  om    o im    s
    p  h n  po t
     yt       r

All valid forms of snake should have a nonzero probability of occurring. Your program's source code should contain at least two non-whitespace characters.
This is code-golf, so the shortest answer in bytes wins.

I assume the initial choice of x should also be random? You might want to clarify that a bit in the initial rules - I don't think you say anything about it until almost the very end.

@FryAmTheEggman Actually the x depends on the sequence of random numbers on each step. For example, if no character goes on a line above line x, then x is the first line. If characters go at most two lines above x, x will be the third line.

I'm tempted to close this as a dupe of the horizontal ASCII snake challenge. This is the kind of generalised quine which can only be solved by a) obtaining a string representation of your code, and b) slapping the string processing task on top of that. There's really no way avoid the generic payload capable quine or to make the quine part save anything on the basic string processing task, so replacing the input with the source code doesn't really add much to the problem, I'm afraid.

I'm sorry, but I don't understand what you are saying at all (or where it appears in your question body). Could you try to explain again what row the first character should appear on? Currently I agree with Martin, but if the placement lets you control something of the output then maybe this will be more than just a generalised quine?

@MartinEnder I could see a program which generates the quine character-by-character (e.g. the standard data--decompresser quine) do both the generation and the special output simultaneously. Outside of that, I think you are correct.

@MartinEnder Yeah, perhaps this should be closed. Had I not sandboxed this before posting, the horizontal snake would have been a duplicate of this.

@FryAmTheEggman The x does not refer to any absolute line, but a starting line relative to which the other lines are added. x+n is the first line of output, where n means how many lines above the starting line the highest part of the snake is.

@MartinEnder I fully agree, although not to the point where I'd use my hammer.

@Steadybox That is indeed unfortunate, but my main point is that even without the other challenge this would have been better as just "given a string, turn it into a random horizontal snake".

@MartinEnder Yeah, I guess so. I considered that version of this, but thought the quine thing might be more interesting.

@Steadybox The reason it's not interesting is simply that most quines are of the separated code and data form, with only a little bit being the "glue" between the two, for example the Python 2 quine s='s=%r;print s%%s';print s%s.

@EriktheOutgolfer Yes, I didn't quite think it through far enough.

05AB1E, 47 bytes
4"D34çýSDεXD<X>ŸΩU}W-úζ»"D34çýSDεXD<X>ŸΩU}W-úζ»

Try it online!


text:
1D Hopping Array Maze
Inspired by We do tower hopping and related to 2D Maze Minus 1D
Introduction
Your task is to find the shortest path to get out of an array maze following specified rules.
Challenge
A 1D array a with n elements can be regarded as a maze composed of n points, where point with index k is connected to the points with k+a[k] and k-a[k] in a one-way manner. In other words, you can jump forward or backward exactly a[k] steps from the point with index k. Points with an index outside the bounds of the array are considered outside the maze.
To illustrate this, consider the following array,
[0,8,5,9,4,1,1,1,2,1,2]

If we are at the 5th element right now, since the element is 4, we can hop 4 steps forward to the 9th element, or 4 steps backward to the 1st element. If we do the latter, we end up with the element 0, which indicates no further moves are possible. If we do the former, since the 9th element is 2, we can choose to hop to the 11th element, which is again a 2, and then we can hop again to the "13th element", which is out of the bounds of the array and considered an exit to the maze.
So if we start from the element in the middle, one way to get out of the maze is hopping 1 step back, 4 steps forward, 2 steps forward and again 2 steps forward, which can be expressed as the array [-1,4,2,2]. Alternatively you can express it with the array [4,8,10,12] which records the zero-based index of all intermediate and final points (1-based index is also fine), or just the signs, [-1,1,1,1].
Escaping the maze from the low-index end is also OK.
Using the first notation and starting from the same element, [1,1,1,2,2] is also a solution but it is not optimal since there are 5 steps instead of 4.
The task is to find out the shortest path to get out of the array maze and output the path. If there are more than one optimal paths, you can output any or all of them. If there are no solution, you should output a falsy value chosen by you that is discernible from a valid path (producing no output at all is also OK).
For simplicity, the number of elements in the array is always an odd number and we always start from the element in the middle.
Test cases
The test cases illustrates various forms of output, but you are not limited to these.
Input
Output

[0,8,5,9,4,1,1,1,2,1,2]
[-1,4,2,2]

[2,3,7,1,2,0,2,8,9]
[2,9] (or [2,-5] or [[2,9],[2,-5]])

[0,1,2,2,3,4,4,4,3,2,2,3,0]
[1,-1,1,1]

[0,1,2,2,4,4,6,6,6,6,6,4,2,1,2,2,0]
[]

Specs

You may write a function or a full program.

The array only contains nonnegative integers.

You can take input and output through any standard form, but please specify in your answer which form you are using.

This is code-golf, the lowest number of bytes wins.

As usual, default loopholes apply here.

Is it fine to output a nested array even if the answer is unique? (e.g. for [0,8,5,9,4,1,1,1,2,1,2], outputting [[-1,4,2,2]])

@Bubbler Yes, you can output nested array.

Is it OK to return the escape path in reverse order. So [1,1,1,-1] instead of [-1,1,1,1] ?

@TonHospel Yes, just say so in your answer.

test case 2 seems incorrect, could you explaint it?

It records the zero-based indices for the intermediate points, including the one outside the maze. I know that inconsistent output format between test cases may cause confusion but I just want to showcase possible output formats without being too verbose. If casted in the output form of the first case it will be [-2,7] or [-2,-7] or the union of them.

JavaScript (ES6), 117 bytes
Returns an array of 0-indexed intermediate and final points, or an empty array if no solution exists.
a=>(g=(x,p,d=a[x])=>1/d?[d,-d].map(d=>p.includes(X=x+d)||g(X,[...p,X])):o=o==''|o[p.length]?p:o)(a.length>>1,o=[])&&o

Try it online!
Commented
a =>                        // given the maze a[]
(g = (                      // g = recursive function taking:
  x,                        //   x = current position
  p,                        //   p[] = list of visited cells
  d = a[x]                  //   d = value of current cell
) =>                        //
  1 / d ?                   // if d is defined:
    [d, -d].map(d =>        //   for d and -d:
      p.includes(X = x + d) //     if the cell at X=x+d was not yet visited,
      || g(X, [...p, X])    //     do a recursive call to g at this position
    )                       //   end of map()
  :                         // else:
    o =                     //   update o:
      o == '' |             //     if o was empty
      o[p.length] ?         //     or p is shorter than o:
        p                   //       set o to p
      :                     //     else:
        o                   //       let o unchanged
)(a.length >> 1, o = [])    // initial call to g(), starting in the middle
&& o                        // return o

Husk, 22 bytes
ḟȯ¬€ŀ¹FS+o*!¹⌈½L¹ṁπṡ1ŀ

Returns a list of signs, or an empty list if a solution does not exist.
Try it online!
Explanation
This is a brute-force solution that checks lists over -1,0,1 of increasing length, and returns the first one that results in a jump out of the array.
Since it is of minimal length, it will not contain 0s.
ḟȯ¬€ŀ¹FS+o*!¹⌈½L¹ṁπṡ1ŀ  Implicit input, say A = [0,1,1]
                     ŀ  Indices of A: [1,2,3]
                 ṁ      Map over them and concatenate:
                  π      Cartesian power
                   ṡ1    of the symmetric range [-1,0,1].
                        Result is B = [[-1],[0],[1],[-1,-1],...,[1,1,1]]
ḟ                       Find the first element of B that satisfies this:
                         Argument is a list, say C = [1,-1].
      F                  Reduce C from the left
             ⌈½L¹        using ceil(length(A)/2) as the initial value
       S+o*!¹            with this function:
                          Arguments are an index of A, say I = 2, and a sign, say S = 1.
           !¹             The element of A at I: 1
         o*               Multiply by S: 1
       S+                 Add to I: 2
                         At the end of the reduction, we have a number I, here 2.
   €ŀ¹                   Is it an element of the indices of A: Yes.
 ȯ¬                      Negate: No.
                        The result is the shortest list C for which I is outside of A.

Python 3, 195 188 179 bytes
def f(a):
 v=len(a);x,*s={v//2},[v//2]
 while all(v>b>-1for*c,b in s)*s:s=[x.add(u)or c+[b,u]for*c,b in s for u in[b+a[b],b-a[b]]if{u}-x]
 return[b[1:]for b in s if not-1<b[-1]<v]

Try it online!
Edit:

Saved 9 bytes by all(..)and s => all(..)*s, if u not in x => if{u}-x
The former exploits boolean * list == int * list, the latter uses set difference (empty set is also falsy).

Output format: Nested array of all optimal answers, given as zero-based indices of intermediate and final points.
For example: f([0,8,5,9,4,1,1,1,2,1,2]) == [[4, 8, 10, 12]].
The algorithm is simple BFS. s records all possible i-length paths on ith iteration, excluding the indices already visited. Note that the extended star notation is (ab)used because repeated array access is expensive. I found that such a notation can also reduce some whitespace if used correctly.
I also made a recursive (but longer) version out of the above solution. Both s and and or s are needed, otherwise it doesn't work.
Python 3, 210 bytes
lambda a:[b[1:]for b in g(a,[[len(a)//2]],{len(a)//2})if not-1<b[-1]<len(a)]
g=lambda a,s,x:s and all(-1<b<len(a)for*c,b in s)and g(a,[x.add(u)or c+[b,u]for*c,b in s for u in[b+a[b],b-a[b]]if u not in x],x)or s

Try it online!

Haskell, 207 202 bytes
5 bytes saved thanks to BMO.
l=length
x!p|i<-h p,d<-x!!i=[p++[x]|x<-[(-d,i-d),(d,i+d)],x`notElem`p]
x?p|i<-h p=i<0||i>=l x
h=snd.last
x#[]=[]
x#p|l(x%p)<1=x#(p>>=(x!))|1>0=x%p
(%)=filter.(?)
f x=(tail.map fst)<$>x#[[(0,l x`div`2)]]

Try it online!
This is a function that takes a list of Int as a parameter and returns a list of paths where each path is a list of relative jumps taken to get out of the array.
The ungolfed version:
move :: [Int] -> [(Int, Int)] -> [Path]
move xs path = map(\x->path++[x]) $ filter (\s -> s`notElem`path) $ [(-delta, i-delta), (delta, i+delta)]
  where (_,i) = last path
        delta = xs!!i :: Int

outside :: [Int] -> Path -> Bool
outside xs paths = i < 0 || i >= length xs
  where (_,i) = last paths

shortest' :: [Path] -> [Int] -> [Path]
shortest' paths xs | null paths       = []
                   | not (null ready) = ready
                   | otherwise        = shortest' paths' xs
                   where ready  = filter (outside xs) paths
                         paths' = concatMap (move xs) paths

shortest xs = map tail $ map (map fst) $ shortest' [[(0,length xs`div`2)]] xs

C (gcc), 269 bytes
#define A n){for(printf("%d,",n);i^l[i];i=l[i])printf("%d,",x[i]);break;}if(!u[n]){u[n]=x[m]=n;l[m++]=i;
#define M calloc(r,sizeof(s))
*x,*u,*l,s,m=1,i,j,n,w;main(r,v)char**v;{s=r-1;x=M;u=M;l=M;for(*x=1+s/2;i<m;i++){j=x[i];if(w=atoi(v[j])){n=j+w;if(s<A}n=j-w;if(1>A}}}}

Try it online!
Initially tried a recursive backtracking search, because using main for recursion is always fun. In the end though a straightforward non-recursive breadth-first search was able to be made smaller, which is what this version is. This program takes the input array as command-line arguments, with no braces, e.g.
0 8 5 9 4 1 1 1 2 1 2 for the first provided example. The program outputs on stdout a list of 1-indexed, comma-delimited array indices in reverse order, starting from the final, out-of-bounds/'escaped' index and working back through the intermediate indices reached (it does not output the center, starting index). The program does not output braces around the array and leaves a trailing comma because separate printf statements take a lot of characters. The output corresponding to the first test example above is 13,11,9,5,, for example.
If there is no escape route from the array maze, the program does not output anything.
Degolfed and explained it is below (heavily degolfed with some changes for readability):
int *x, *u, *l, s, m = 1, i, j, n, w;                        //Declare all the state we'll need
int main(r, v) char** v;{
    s = r - 1;                                               //s is our actual array size, since v[0] is the program name.
    x = calloc(r, sizeof(int));                              //x is an array that will form our BFS queue. Since it is a BFS we've no need to visit any elements more than once (first visit will have been on a shortest route to it), so the amount of space we have here should suffice.
    u = calloc(r, sizeof(int));                              //u is an array that will be used to flag when an array index has been visited; only reason it's int* is for ease of declaration
    l = calloc(r, sizeof(int));                              //l is an array that will be used parallel to x and stores backpointers in the form of indexes into x, which will be used to construct the actual path once it is found.
    x[0] = 1 + (s/2);                                        //Init the first element in the queue to our center index of the array, adding one because of the program name in v/argv.
    for(; i < m; i++) {                                      //m is the number of elements in our BFS queue. It starts at 1 and grows during iteration; if this loop terminates before finding a path there is none.
        j = x[i];                                            //Current index in the array we are examining
        if (w = atoi(v[j])) {                                //Set w to be the actual array value at the current index (and check that it's nonzero since if it isn't we can't get anywhere from here)
            n = j + w;                                       //Try a move in the positive direction
            if (n > s) {                                     //If the move escapes the array
                for(printf("%d,", n); i ^ l[i]; i = l[i]) {  //Print the location escaped to and then loop back through the backpointers to reconstruct the path. The only backpointer that will point to its own queue index is the starting one, so terminate there.
                    printf("%d,", x[i]);                     //Print each intermediate array index
                }
                break;                                       //Then break the outer for loop and exit.
            }
            if(!u[n]) {                                      //If the jump didn't take us out of the array and we haven't visited where it goes to, add it to the queue.
                u[n] = x[m] = n;                             //m is the current tail of the queue, so put this new location there. Since we're 1-indexed and if n was zero we'd have escaped, we know it isn't so can use it to mark this index as visited also.
                l[m++] = i;                                  //Also set the backpointer for this new queue element to point back to the current index, then increment the tail of the queue.
            }
            n = j - w;                                       //Now the backwards move
            if (n < 1) {                                     //Repeat analogous to the forward case.
                for(printf("%d,", n); i ^ l[i]; i = l[i]) {
                    printf("%d,", x[i]);
                }
                break;
            }
            if (!u[n]) {
                u[n] = x[m] = n;
                l[m++] = i;
            }
        }
    }
}

As usual for golfed C code, compilation output will of course include a friendly wall of warnings and notes.

253 bytes

Ruby, 102 bytes
->a{b=[[a.size>>1]];b.map{|x|(v=a[w=x[0]])&&w>=0?[w-v,w+v].map{|j|x.index(j)?0:b<<[j]+x}:(break p x)}}

Try it online!
Takes input maze as an array, outputs by printing the escape path in reverse, from the exit to the starting point (inclusive). Prints nothing if there is no escape.
This approach misuses the map method to iterate through a temporary array storing the history of paths, which is constantly extended on the fly whenever there is another possible step to take.
In principle, I could save another byte by using return x instead of break p x, but that would mean claiming that my falsy value is equal to all the monstrous rubbish stored in b. Probably, this would be too much, even considering the allowed flexibility of the output...
Walkthrough
->a{
  b=[[a.size>>1]] #Initialize an array of paths with our starting point index
  b.map{|x|       #Iterate through this array
    (v=a[w=x[0]]) #w is the current point in the path, v is its array value
    &&w>=0        #Ruby's support for negative indexing costs us 6 bytes :(
    ?             #If we are still within the bounds of the maze
      [w-v,w+v].map{|j| #Try moving in both directions
        x.index(j)? #If we have been there before, or stuck on zero
        0         #This is a dead-end, just assign a throwaway value
        :b<<[j]+x #Otherwise push the elongated path on top of our iterator
      }
    :(break p x)  #Escaped! Exit the loop and report the path
  }
}

Perl 5, -a: 73 bytes
(old style counting: 75 bytes, +1 for a and +1 for replacing -// by -/$/ and using $` for $')
#!/usr/bin/perl -a
use 5.10.0;
@;=$#F/2;$v{$^H=$_}//=push@;,map$'+$_*($F[$^H]//1/!say$').$".$',-//,1for@

Give the input array as one line on STDIN e.g. 0 8 5 9 4 1 1 1 2 1 2
prints the visited positions in reverse order including the starting point, then crashes
Prints nothing if there is no solution
Try it online!

Python 3, 133 bytes
def f(k,*s):*p,x=len(k)//2,*s;return{x}-{*p}and min([a for a in(f(k,*s,x-k[x]),f(k,*s,x+k[x]))if a]or[()],key=len)if~0<x<len(k)else s

Try it online!
Outputs the shortest list of all visited indices.
Port of my answer to Find the shortest route on an ASCII road.


text:
Find the dot product of Rationals
I was at a friend's house for dinner and they suggested the idea of a "Prime-factor vector space".  In this space the positive integers are expressed as a vector such that the nth element in the vector is the number of times the nth prime divides the number.  (Note that this means that our vectors have an infinite number of terms.)  For example 20 is
2 0 1 0 0 0 ...

Because its prime factorization is 2 * 2 * 5.
Since prime factorization is unique each number corresponds to one vector.
We can add vectors by pairwise adding their entries.  This is the same as multiplying the numbers they are associated with.  We can also do scalar multiplication, which is akin to raising the associated number to a power.
The problem is that this space is not in fact a vector space because there are no inverses.  If we go ahead and add the inverses and close the vector space we now have a way of expressing every positive rational number as a vector.  If we keep the fact that vector addition represents multiplication.  Then the inverse of a natural number is its reciprocal.
For example the number 20 had the vector
2 0 1 0 0 0 ...

So the fraction 1/20 is its inverse
-2 0 -1 0 0 0 ...

If we wanted to find the vector associated with a fraction like 14/15 we would find 14
1 0 0 1 0 0 ...

and 1/15
0 -1 -1 0 0 0 ...

and multiply them by performing vector addition
1 -1 -1 1 0 0 ...

Now that we have a vector space we can modify it to form an inner product space by giving it an inner product.  To do this we steal the inner product that vector spaces are given classically.  The inner product of two vectors is defined as the sum of the pairwise multiplication of their terms.  For example 20 · 14/15  would be calculated as follows
20    =  2  0  1  0  0  0 ...
14/15 =  1 -1 -1  1  0  0 ...
         2  0 -1  0  0  0 ...  -> 1

As another example the product 2/19 · 4/19
2/19 = 1 0 0 0 0 0 0 -1 0 0 0 ...
4/19 = 2 0 0 0 0 0 0 -1 0 0 0 ...
       2 0 0 0 0 0 0  1 0 0 0 ... -> 3

Your task is to implement a program that performs this dot product.  It should take two positive rational numbers via either a pair of positive integers (numerator and denominator) or a rational type (floats are not allowed, because they cause problems with precision and divisibility) and should output a integer representing the dot product of the two inputs.
This is code-golf so answers will be scored in bytes with fewer bytes being better.
Test Cases
4 · 4 = 4
8 · 8 = 9
10 · 10 = 2
12 · 12 = 5
4 · 1/4 = -4
20 · 14/15 = 1
2/19 · 4/19 = 3

A vector does not have a dimension, a vector space does.

@JonathanFrech I think it's a little bit pedantic, but I've made the change.

"Natural numbers" is generally understood to contain 0, which isn't represented in your system. And these aren't vectors. A vector space is over a field, and this is over a ring, which would make this a module. And it isn't a separate space from the integers, it's the same space with a different representation.

@Acccumulation "Natural numbers" is not a well defined term, depending on who you ask it may or may not contain zero. You are correct that the "scalar multiplication" in my question forms a G-set with a monoid rather than a group, but that was simplified for the purposes of making the question palatable. I'm not sure what to make of your last comment, sure it has the same cardinality as the integers, but the action is really what defines a space not it's size. Perhaps you mean something more specific that I am missing. If so I'd be happy to continue this discussion (in chat might be best).

Can we take input as (num1, num2, den1, den2)?

Another terminology nit-pick: Vector spaces are generally requred to have scalar multiplication from a field, so just using integers is not enough. That's because we want parallel vectors to be multiples of one another, not just have some multiple in common. For instance, $4$ and $8$ are parallel "vectors" in this space (they are both of the form (a, 0, 0,...)), but neither is a scalar multiple (i.e. an integer power) of the other. There aren't really many other terms you could use, though, that would be known to people in general. "Free module over the integers" is the best I can do.

@xnor That's fine, I believe Luis Mendo has already done it.

MATL, 12 bytes
YF2:&Y)dwd*s

Input is an array [num1 den1 num2 den2].
Try it online! Or verify all test cases.
Explanation
Consider example input [20 1 14 15].
YF      % Implicit input: array of 4 numbers. Exponents of prime factorization.
        % Gives a matrix, where each row corresponds to one of the numbers in
        % the input array. Each row may contain zeros for non-present factors
        % STACK: [2 0 1 0
                  0 0 0 0
                  1 0 0 1
                  0 1 1 0]
2:&Y)   % Push a submatrix with the first two rows, then a submatrix with the
        % other two rows
        % STACK: [2 0 1 0
                  0 0 0 0],
                 [1 0 0 1
                  0 1 1 0]
d       % Consecutive difference(s) along each column
        % STACK: [2 0 1 0
                  0 0 0 0],
                 [-1 1 -1 1]
wd      % Swap, and do the same for the other submatrix
        % STACK: [-1 1 -1 1]
                 [-2 0 -1 0]
*       % Element-wise product
        % STACK: [2 0 -1 0]
s       % Sum. Implicit display
        % STACK: 1

C (gcc), 99+32 = 131 bytes

Using a compiler flag requiring 32 bytes, -D=F(v,V,e)for(;v%p<1;V+=e)v/=p;.

T,p,A,C;f(a,b,c,d){T=0;for(p=2;a+b+c+d>4;p++){A=C=0;F(a,A,1)F(b,A,~0)F(c,C,1)F(d,C,~0)T+=A*C;}a=T;}

Try it online!

I think it's better to explicitly specify that the additional flag -D=F(v,V,e)for(;v%p<1;V+=e)v/=p; (32 bytes) is used (so 99+32=131); otherwise the code alone makes little sense.

Jelly, 12 11 bytes
ÆEz0_2/€P€S

Try it online!

Python 2, 110 bytes
l=input()
p=t=2
while~-max(l):r=i=0;exec"while l[i]%p<1:l[i]/=p;r+=1j**i\ni+=1\n"*4;t+=r*r;p+=1
print t.imag/2

Try it online!
Takes input like [num1, num2, den1, den2]. Uses a complex number r to store the entries for prime p for the two rationals, and  (r*r).imag/2 to extract their product r.real*r.imag within overall the sum t. Adding 1j**i for i=0,1,2,3 does each combination of incrementing or decrementing the real or imaginary part for the four input numbers.
Bubbler saved 2 bytes combining the initial values p=t=2.

p=t=2 instead of p=2;t=0 since t.real is ignored anyway (TIO).

@Bubbler Nice one, adding!

Wolfram Language (Mathematica), 55 bytes
Dot@@PadRight[SparseArray[Rule@@@FactorInteger@#]&/@#]&

Try it online!

Python 2, 133 127 bytes
a=input();s=0;p=2;P=lambda n,i=0:n%p and(n,i)or P(n/p,i+1)
while~-max(a):a,(w,x,y,z)=zip(*map(P,a));s+=(w-x)*(y-z);p+=1
print s

Try it online!
Stole the loop condition from xnor's submission.
Thanks for the advice by @mathmandan to change the function into a program (Yes, it indeed saved some bytes).
Obsolete, incorrect solution (124 bytes):
lambda w,x,y,z:sum((P(w,p)-P(x,p))*(P(y,p)-P(z,p))for p in[2]+range(3,w+x+y+z,2))
P=lambda n,p,i=1:n%p and i or P(n/p,p,i+1)

Isn't p going to test non-prime values like 9?

Oops, I'll fix it soon.

You can replace return with print, and you can also save the indentation spaces if you write as a program instead of a function.

@mathmandan Thanks for the info. Looks useful for my other Py2 submissions, not sure for Py3 though (it takes extra eval() unless the function input itself is a string).

JavaScript (Node.js), 104 ... 100 94 bytes
F=(A,i=2)=>A.some(x=>x>1)&&([a,b,c,d]=A.map(G=(x,j)=>x%i?0:1+G(A[j]/=i,j)),a-b)*(c-d)+F(A,i+1)

Try it online!
Pass the numbers as an array of [Num1, Den1, Num2, Den2].
Thanks for Arnauld for fixing the missing F= with no extra bytes, and 2 more bytes less.
Explanation & ungolfed
function F(A, i = 2) {                 // Main function, recursing from i = 2
 if (A.some(function(x) {              // If not all numbers became 1:
  return x > 1;
 })) {
  var B = A.map(G = function(x, j) {   // A recursion to calculate the multiplicity
   if (x % i)
    return 0;
   else
    return 1 + G(A[j] /= i, j);        // ...and strip off all powers of i
  });
  return (B[0] - B[1]) * (B[2] - B[3]) // Product at i
   + F(A, i + 1);                      // Proceed to next factor. All composite factors
 }                                     // will be skipped effectively
 else
  return 0;                            // Implied in the short-circuit &&
}

J, 19 bytes
1#.*/@,:&([:-/_&q:)

Try it online!
Explanation:
A dyadic verb, arguments are on both left hand and right hand side
         &(        ) - for both arguments (which are lists of 2 integers)
               _&q:  - decompose each number to a list of prime exponents
           [:-/      - and find the difference of these lists
       ,:            - laminate the resulting lists for both args (to have the same length)
   */@               - multiply them
1#.                  - add up

Stax, 11 bytes
ä÷ß½♂←√:=Ü]

Run and debug it
The corresponding ascii representation of the same program is this.
{|nmMFE-~-,*+

Basically, it gets the prime factorization's exponents for each part.  It takes the difference of each pair, then the product, and finally sums all the results.

Haskell, 153 bytes
(2%)
n%m|all(<2)m=0|(k,[a,b,c,d])<-unzip[(,)=<<div x.max 1.(n*)$until((>0).mod x.(n^))(+1)1-1|x<-m]=(a-b)*(c-d)+[i|i<-[n..],all((>0).rem i)[2..i-1]]!!1%k

Try it online! Example usage for 20 · 14/15: (2%) [20,1,14,15].