Postgres has a query optimizer that uses Genetic Algorithms: https://www.postgresql.org/docs/current/static/geqo.html
Clarification: this is for planning how to execute a query, not for tuning the db settings
Clarification: this is for planning how to execute a query, not for tuning the db settings