1. publish it e.g. as a paper or open source, letting all big AI labs to use it for free
2. keep it secret
Are you saying that it's evil to have a secret third option of making the algorithm public but forcing AI labs to share profit if they use it?
Software patents are evil.
Let say you come up with a patent. You let open source use the patent, GPL3 ..., for free why charging close source solutions.
That could go to funding the open source development or other gains. FANNG has the money, take it from the them by all means.