AI

How to call OpenAI’s ChatGPT API

Here is how you can call OpenAI’s ChatGPT API, given that you have an API key. Follow these instructions to get one. import openai   openai.api_key = ‘<your API key>’   openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Who won the world series in 2020?"}, {"role": "assistant", "content": …

How to call OpenAI’s ChatGPT API Read More »

How to sort numbers with an evolutionary algorithm (CMA-ES)

Yes, this is clearly nonsense. Sorting is not a hard problem and standard algorithms such as quicksort and mergesort have O(x^2) and O(n log(n)) complexity. But let me scratch this itch of sorting numbers using an evolutionary algorithm, specifically Covariance matrix adaptation evolution strategy (CMA-ES). Technically, we will use what I think is the original …

How to sort numbers with an evolutionary algorithm (CMA-ES) Read More »

How AI, robotics and advanced manufacturing could impact everybody’s life on Earth

What if everybody could live a wealthy, healthy, job-less and creative life in a post-scarcity Universe? Are we currently on a trajectory to this new reality and what are the obstacles we may face on the way? What are the important game-changing technologies? TODO: create and agenda (very tentative): 1) contrast current life circumstances with …

How AI, robotics and advanced manufacturing could impact everybody’s life on Earth Read More »