PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from math import sin, pi, cos
from random import choice, shuffle, sample
from itertools import permutations
from numpy.random import choice as choose
import re
# 888 888 d8888 8888888b. 888b 888 8888888 888b 888 .d8888b. 888
# 888 o 888 d88888 888 Y88b 8888b 888 888 8888b 888 d88P Y88b 888
# 888 d8b 888 d88P888 888 888 88888b 888 888 88888b 888 888 888 888
# 888 d888b 888 d88P 888 888 d88P 888Y88b 888 888 888Y88b 888 888 888
# 888d88888b888 d88P 888 8888888P" 888 Y88b888 888 888 Y88b888 888 88888 888
# 88888P Y88888 d88P 888 888 T88b 888 Y88888 888 888 Y88888 888 888 Y8P
# 8888P Y8888 d8888888888 888 T88b 888 Y8888 888 888 Y8888 Y88b d88P "
# 888P Y888 d88P 888 888 T88b 888 Y888 8888888 888 Y888 "Y8888P88 888
# Don't try this code on Code Playground
# It's a very greedy code, takes many seconds for each generation
# The only output you'd get here is 'Time limit exceeded'
# Copy/paste it to your computer's IDE
#
# ╭---------------------------------------------------------------╮
# ┃ ┃
# ┃ Mathematical Function approximation with n degree polynomials ┃
# ┃ ┃
# ┃ by Genetic Algorithm -- Cestpasgrave ┃
# ┃ ┃
# ╰---------------------------------------------------------------╯
#
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run