↓ Skip to main content

Passive vs active agent

Question
#

Are passive or active agents more intelligent?

Answer
#

A passive agent is an agent that simply does its thing but does not interact with the environment.

An active agent is an agent that actively interact with the environment.

Given those two definitions, we expect the active agent to appear more intelligent because it behaves according to its environment and interacts with it. A passive agent may however also behave according to its environment, it just doesn’t try to alter it.

Is an agent that never says anything necessarily dumb? Such agent could be hiding all the information of the world within itself, and could potentially solve any problem thrown at him, but it simply does not offer such answers because it doesn’t interact with the world. The relationship between the agent and the world is one-sided, from the environment (on)to the agent. From the outside, the agent looks like an inanimate object that doesn’t know anything nor can it do anything. But if you are able to peek inside, you can observe the most complex processes occurring. I would suggest that such agent is highly intelligent.

In the stock market, we say that an investor is active if they regularly manage their portfolio, while a passive investor is one that manages their portfolio less frequently, depends on indexes instead of individual stocks and prefer to rely on the trend of stocks to make a profit. Active management is often compared to passive management as a benchmark, that is to say, you should not get involved in active management if your strategy cannot beat a simpler passive strategy. It is often the case that we see active investors as being foolish and more likely to lose money than passive investors.

References
#


A general characteristic of simple programs that are able to learn complex behaviors

Question
#

Is there a general characteristic of simple programs that are able to learn complex behaviors, such as neural network or RL-based algorithms that can be implemented in less than 100-250 lines?

Answer
#

I don’t know yet.

This question has come after thinking about DNA as being the code of human beings. DNA is also part of other animals, even viruses. Organisms use nucleotides to store the programs that are necessary to their existence. DNA is used to produce proteins within the body that accomplish various functions such as regulating our body, controlling our mood, our attention, our hunger, etc.

This code has evolved since we were non-biological. From a large amount of randomness (chemical elements), nucleotides were formed, which then somehow led to the formation of DNA itself after a likely long process. If through randomness we moved from a chaotic world to one with order and structure, and where a chain of DNA could finally emerge, it would be interesting to investigate the process in further details to determine whether it could give us clues regarding the process of creating a program that could evolve the same way DNA did.

Cellular automaton are also interesting to study in that aspect. By defining a small set of rules, it is possible to generate and observe complex behaviors.

One common behavior of cells is that they reproduce. As such, I would expect a program that can learn complex behaviors to have some reproductive function. Reproduction is considered as one of the traits of an entity being alive. My idea here is that exploring how we were able to massively populate the Earth may provide us with ideas on how a bit of code learned to lengthen itself, by the same process increasing the size of its host as well as the complexity and variety of cells that compose it.

References
#


Will an AGI be superior to a large group of individuals?

Question
#

Will an AGI be superior to a large group of individuals (e.g., society or a company)?

Answer
#

Most likely.

An AGI may be a strong single-minded entity. Unlike societies and companies that are composed of numerous individuals with different values/beliefs/opinions (VBO), an AGI is expected to have a single set of clear, concise and non-contradicting VBO. An AGI should be able to explore all potential alternatives and reason about all the potential sets of VBO in order to determine the most coherent and appropriate set to hold.

Meanwhile, we as individuals hold VBO that are often inconsistent. As a group, we are heterogenous in our VBO which means that conflict will arise since some sets of VBO cannot coexist. Our biggest issue is that we are competitive by nature. People fight over resources if they are limited. Fighting leads to winners and losers. The winners may not be necessarily the individuals with the “best” set of VBO. The fact that the “fittest” VBO may end up as the winner instead of the “best” set of VBO sounds unlikely to lead us to produce the optimal solution to a desired goal.

(This assumes that there is a single “best” VBO set and not various VBOs sets in the heterarchy of VBOs.)


Organizing unread content

Question
#

How can I organize all the webpages I never read?

Answer
#

TL; DR
#

  1. Delete articles you know you will never read
  2. Add articles you’d like to read one day in a system such as pocket
  3. Track when articles are added to your “must-read” list, after 1 year “graduate” them by deleting them from the list
  4. Estimate how long an article takes to read and how much value you expect it will bring you
  5. Use the ROI to order your reading list

The details
#

The following method applies to content online as well as offline (magazine article, books).

The first, most important, and difficult strategy, is to simply let go of those articles. Most of the time, we keep certain things out of fear of missing out. We may also think that if at some point we have free time we’ll go through them, however that never happens. We always try to find something new instead. This can be seen as a way for the mind to communicate that it doesn’t think it would be worthwhile to spend its time reading this content so it’s better not to and instead we should look for alternative content to read.

Once you’ve gotten rid of all those articles you decided you would never read you can add them to tracking systems such as pocket. The idea here is that it may be possible for you to read this content, but in other contexts than when you’re in front of your computer. Maybe you’d be likelier to read the article if you’re waiting in line or waiting for your bus/subway. Maybe you’d read it if you’re on your way to work.

Track when you add articles to your list. The older an article becomes, the less likely you will be to read it. As articles reach a certain age, it might be time to graduate them to the graveyard, in other words, to never read them. Mark them as read or remove them from your reading list.

You should have an idea of how long an article takes to read. Pocket offers an estimate of how long it takes to read an article. Knowing how long it takes to read an article is important since one of the techniques to get rid of articles is to go through all the short articles first since the time investment may be low.

As in the case of task management, the strategy we will want to adopt to organize and prioritize our reading will be related to the return on investment (ROI) metric. Each article should have an estimate of the value it will bring you to read it (e.g., how much you would have paid to acquire this knowledge), as well as an estimate of the effort (duration, e.g., how long it takes to read the article according to pocket) necessary to go through it. You can then order your reading list from articles with the highest ROI to the least ROI and feel more confident that you are reading high (expected) value content.


How to prioritize which book to read

Question
#

How can I easily identify the next book I should read when I have over 500 to choose from?

Answer
#

TL; DR
#

  • Pick highly read books
  • Determine why you want to read, this will filter out many books from your list
  • Track how long you’ve wanted to read a book, you’re more likely to read ones you recently added to your list
  • Fiction: pick based on your tastes of the moment
  • Non-fiction/technical: select a few books on the same topic, skim through them, then pick the best

The details
#

My first heuristic when deciding which book to read is to consider how many people have already read it by using a site such as goodreads. The reason is that I want to read books that I may be able to discuss with others who will also have read the book. Reading niche books might be interesting, but it makes discussing them a lot more difficult.

For fiction books, I read books from a collection I’ve enjoyed at least one book. You could basically consider it book “social” proofing. For new books that are not part of a collection and from authors I’ve never read, I mostly decide based on my interests of the moment.

For non-fiction/technical books, I skim through a few books on the same topic and determine which book I feel the most confident will provide me with the most information presented in the most appropriate and succinct way.

Determining why you want to read will help you figure out what the most appropriate next book might be. You may want to relax and thus reading a technical book may not be appropriate while a fiction book would be. You may want to learn a new programming language and thus reading about a programming language you already know will not achieve that goal.

I suggest using a book tracker like goodreads as it will allow you to track when you added a book to your list. This will let you know how long the book has been sitting in your reading list, waiting to be read. Generally, the longer a book stays “shelved” the less likely it is you will ever read it. This generalizes to stating that most books are read in a LIFO (last in, first out) fashion.

References
#


AI coach for video games

Question
#

How would you build an AI that could offer coaching for games like StarCraft or Dota/LoL?

Answer
#

I see coaching as similar to the loss function of a machine learning model. I also see coaching as trying to optimize a (program’s) function by figuring out where the largest improvements can be made. In order to provide effective and useful feedback, a coach should focus on the areas where the player shows the most potential for improvement. In a game like Starcraft, that would mean first pointing out the macro level mistakes then the micro level mistakes.

To coach you need to have a model of which actions have an impact on the game and how much impact they have. A learning algorithm/model like AlphaZero generally exhibits two types of learning: learning from observation and learning by playing against itself.

Learning from observation
#

Humans
#

The most common approach to coaching is by observing more successful players than themselves. The learners may watch better players while the better players are playing the game and commenting on their gameplay or the learners may watch someone reviewing a replay and providing their own analysis. Both of these cases can be seen as models (the players) trying to explain their internals (the logic behind their actions).

Coaching generally starts by trying to reproduce the recipe of someone else. You may not understand why they are doing certain things, but you do it yourself and you observe the results. As you practice repeating those same observations => actions, you try to reproduce as closely as possible what the better player would do.

AI
#

In the first learning phase, the model simply observes what happens during gameplay. In competitive games such as MOBA/RTS, the only reward signal is the victory/loss at the end of a game. As human beings, we quickly learn that winning a fight/encounter is good and losing it is bad. Those give use intermediate reward signals that an AI agent may not be able to build right away since it is conceptually difficult to determine when an encounter begins and ends. The agent could however learn a simple metric such as the sum of the health of all units, where keeping this value high is generally a good thing.

The model will need at some point to be able to establish its own scoring system so it can give itself some intermediate rewards during a game. It will also need to learn how to segment a sequence of actions into repeatable action units such as constructing unit X, attacking player Y, defending zone Z. As such, it may deem that constructing unit X is worth 5 units of reward, attacking player Y is worth no reward and that defending zone Z is worth 30 points of reward. The value of rewards may vary based on numerous factors, such as how much time has elapsed since the beginning of the game, the known enemy army composition, existing vision, etc.

Having actions such as “attack coordinate X, Y” are a too low level. Your model will have to learn hierarchically complex actions such as “attack player X”, “attack the gatherers of player X”, “attack the weak gatherers of player X”, etc. which will then translate down the hierarchy to “attack unit at coordinate X, Y”.

An AI coach may look at hundreds or thousands of replays and observe the distribution of units allocation after 1, 2, 3, 5, 10, 15, 20 minutes (or every 5 seconds) into the game and their correlation to whether the player won or lost. It may look at the items purchased by the player in a MOBA game, their timing and their correlation to whether the player won or lost. For a human being to do similar thing would require a lot of time. Most would probably write scripts to automate the process of collecting those details instead of manually going through the replays one by one.

Learning by playing against yourself
#

Playing against yourself is more complicated. A perfect recording of your actions may not prove difficult to beat. It may send units to the wrong location on the map, be caught off guard moving to a location while you positioned units in the middle of the path, it may react to an attack the “replay” opponent had sent to its base at one point in the game, etc. It is however a start, one example you can train against.

A lot of players who are invested in the game will do theorycrafting which is basically to use logic and reasoning in order to assess what to do in specific situations. They simulate various potential cases in their head and they devise plans to defeat them. While a human being may be able to devise a few dozen simulations over an hour, a computer may be able to generate hundreds of thousands. It may also be able to test them in a more accurate simulation environment. When game patches are released, it could rerun all the simulations it had generated to determine the impact of the patch on its existing strategies.

An AI coach can be provided the game rules, specifically, which units are weak/strong against other units, and look at the game while you are playing. If you attack your opponent and the AI observes a strong concentration of a specific type of unit, and it notices you do not have any of the units that counter this unit type, it may suggest that you start building those as soon as possible. It may also notice that your unit composition is weak against the unit composition of your enemy and suggest units to build to balance your army and to be better prepare for the next encounter.

We can see this act of theorycrafting as the equivalent of knowing, at a high level, the strategies and counter-strategies one can employ at an early point in the game, the same way you can learn the different opening moves in chess.

In the case of learning by playing against yourself, what we want the AI coach to provide us is an opponent that will challenge our current biggest weaknesses so we can address them. In many cases certain specialized strategies will be extremely strong against a specific type of strategy and we will want to know those cases so we can use those strategies when the time is right.

Features we may want from an AI coach
#

  • Determine your weaknesses/areas of improvement
  • Suggest potential approaches to solve recurrent problems we have
  • Suggest heuristics that may be easy to understand and follow as human beings
  • Simulate opponents that would exert your current weaknesses so you can practice against them
  • Collect various gameplay related statistics their associated success rate (number of units of type X after Y minutes, number of creeps killed after X minutes, items purchase order, build order, etc.)

Things to explore
#

  • If you were in an environment where you had access to very few replays, how would you learn the most out of those available?

How to prioritize numerous tasks

Question
#

How do you prioritize things when there are so many of them competing against one another?

Answer
#

My approach to task prioritization, assuming that you have a list of tasks with no other information, involves adding information that will help you prioritize them.

Important/Urgent
#

Assuming you are using an issue tracking system like Redmine, Notion.so or JIRA, I would add two new properties to each task: important and urgent. This approach is based on the Eisenhower method of time management. You will want to go through all the tasks and determine whether they are important and whether they are urgent.

With this first pass of information added to your tasks, you should be able to prioritize them in the following order:

  1. Important/Urgent
  2. Important/Not urgent
  3. Not important/Urgent
  4. Not important/Not urgent

You should avoid as much as possible spending your time on tasks that are not important.

This is the first step to prioritizing your task. It is a lightweight approach to prioritization which will also allow you to consider whether a task has any importance, something that is sometimes not considered and leads people to work on low priority/importance tasks.

Return on investment (ROI)
#

At this point, we now assume that you have a lot of tasks that are not urgent but important. So many in fact that it is hard to decide which ones to do. It may feel like you’re back to square one, but now the important/urgent properties are not useful to order these tasks anymore since they all have the same value. This is where the return on investment (ROI) metric is useful.

Similar to the important/urgent properties, we will add two new properties: estimated value (in dollars) and estimated effort (in hours). A third field, the ROI, is automatically derived from the previous two by computing estimated value divided by estimated effort.

For each task, you will want to estimate to the best of your knowledge how much effort would be required to complete the task, as well as how much value you expect it to bring. Once you have those numbers for all your tasks, you should be able to order them by descending ROI. This will provide you with the list of tasks you should work on in order, as they are the ones likely to provide you with the highest amount of ROI, that is, the most value for the time spent.

After ROI
#

If at this point you still have many tasks that have the same ROI, you can first try to tackle the ones with the least amount of effort to get them out of the way and have quick wins.

If you still have too many of your top ROI tasks with the same ROI value, my current approach cannot deal with this situation. It becomes a question of defining a higher level roadmap, determining which collection of features may have more impact than others, etc. It may also be possible to look into additional properties of the task, such as how long since they’ve been created and left incomplete.

References
#


When to stop working on a task

Question
#

Given that you define a return on investment (ROI) on a task, when should you stop working on a task and abandon it given its cost?

Answer
#

Let’s assume that your task has an estimate of effort (in hours) and an estimate of value (in dollars). The ROI is defined as the value divided by the effort ($/h).

Before starting any task, you should define what is the minimal ROI a task should have to be considered (i.e., your ROI threshold). If you value your time at 50 $/h and a task has an estimated ROI of 25 $/h, then it is probably not worth your time to work on this task. Any task with a ROI superior to 50 $/h is considered worthwhile.

A task should be reviewed at half the estimated effort duration. If you estimated the task will take 8h, then at 4h you should reevaluate whether you think you will finish the task in the remaining 4 hours. If 8h still stands, then you can proceed. If you believe you can accomplish the task in less time, then update your effort estimate. This should by the same act increase its ROI. If on the other hand you think that the task requires more time, then update the effort estimate as well. If you have increased your effort estimate, then I suggest reevaluating the task at the midpoint of the remaining effort (e.g., an 8h task updated to 12h would be first evaluated at 4h, then at 8h).

Since you are updating your ROI estimate, you can also update your estimate of the value of the task you are working on. If it is a large task, maybe after having prototyped the idea you realize it will not provide as much value as anticipated. You can then review its value down. If on the other hand you get excited by what it brings to the table, by all means, increase its estimated value.

Once you have adjusted the estimated effort and value, take a look at your estimated ROI. If it has gone below your threshold, consider dropping it. Investing additional time in it may provide less value than working on a new, more valuable task. If on the other hand, the ROI is still superior to your threshold, then continue working on the task.

References
#


Determining a model usefulness

Question
#

How do you determine whether you have a useful model?

Answer
#

In machine learning, one way you can determine that you have a useful model is to compare it against baseline models. In a field such as time series, one can create models that are based on previous values, such as lag 0, which predicts that the next value will be equal to the current value, or a moving average, which takes the X last values and averages them and returns this average as the next predicted value. In this field, we expect that a model that can predict more accurately than those baseline models may prove to be useful.

In other cases, we may already have an existing model from which we can generate predictions. This model may also serve as a baseline which other models will have to beat in order to replace it.

There is however a case where the answer isn’t clear: what happens when out of various models, one of the baseline models is the best? Then it becomes a question of whether the prediction interval produced by the model satisfies your needs for your problem.

Note that even when you beat the baseline models, if the best model still does not satisfy the error requirements that have been defined on the metrics you care about, the model may still not be useful. For example, an OCR model that has 95% accuracy at the character level will still produce 5 errors every 100 characters, which may be too high for the requirements of the system to be produced.

Another factor to keep in mind when comparing models is whether the improvements on the metric you are to optimize for are significant. The mean absolute error (MAE) may be lower for a model compared to another, but if its confidence interval is larger compared to the other model and their intervals overlap, then you cannot claim that one model is really better than the other. There may even be cases where you will prefer a model with higher MAE simply because its confidence interval is smaller than the other model with lower MAE but larger confidence interval.

There might be other attributes of the model that you may need to take into account. A model that takes days to train may be useless when you need it to be up to date every hour. A faster to train but less accurate model may be more useful in this case.

Summary
#

  • Can the model under evaluation beat baseline models?
  • Does the model under evaluation satisfy error requirements?
  • Is the model under evaluation significantly better than existing models?
  • Does the model under evaluation satisfy requirements such as time to train (e.g., less than 6 hours) or necessary resources (cpu, gpu, ram)?

Reducing our size for space exploration

Question
#

Is reducing our size a viable alternative/approach to space exploration?

Answer
#

I don’t have enough knowledge of physics to determine all the impacts that scaling ourselves down would have. There are a few things I would consider, such as:

  • the impact on being launched in space
    • do we need less energy?
    • are there other means to get us in space if we’re smaller?
  • our ability to accelerate/decelerate in space
    • what kind of technology can we use?
  • our ability to send communication signals back on earth
    • given our small size, how can we produce enough power for the signal to be received?
  • are there physical phenomenons that we need to take into account due to our reduced size?

When I asked myself this question, I was reading Accelerando, where a crew is sent far in space in a “can”. I always perceived it as being the size of a soft drink can and I thought that was an interesting idea. In the book they are not shipping human beings, but rather a simulation of their consciousness. In other words, they’re sending an AI in a can™. I’ve also thought of this as explaining why we’ve never been visited by aliens. Maybe one of the steps in evolution or progress is that we are able to scale ourselves down so that we are not as visible as we currently are. Imagine being an ant colony instead of the human society, our footprint would be a lot less noticeable from outer space. Furthermore, if you were to travel in a can, it would be a lot more difficult to detect you than if you were travelling in an extremely large ship.

The benefit I could see from being able to reduce the size of our satellites or vessels is that less mass is required to be turned into a spacecraft, which could allow us to create many more spacecrafts for the same amount of materials.

This question is also reminiscent of movies like Honey, I shrunk the Kids, Downsizing, Ant-Man or even a recent Rick & Morty episode. They explore the differences between full and miniature scales.