# Cognitive Science: An Introduction/Memory Introduction

Memory is the creation of a representation in an agent so that it might be used in the future to make better decisions. This definition is intentionally very broad, so it will be helpful to talk about examples.
When an agent interacts with its environment, that environment might change the agent in many ways. For example, a creature might break its leg after falling down a hill. However, we don't consider this memory because the broken leg does not, in any functional way, represent anything other than itself.

## Memory and Sleep

In many mammals and birds, sleep is important for consolidating memories. Sleep has two basic stages, Rapid Eye Movement (REM) sleep, and non-rapid eye movement (NREM) sleep. NREM sleep is more common in early stages of a night's sleep, and REM is more common in the later parts, up until waking. NREM is more important for encoding declarative memories, and REM sleep (and dreaming, which primarily happens during REM sleep) is good for encoding procedural memories. Staying up later reduces memory consolidation of facts, and getting up early prevents memory consolidation of how to move.

## Memory in Plants

The next section is all about human memory, which we know the most about. But memory happens in most animals and some plants. The memory plants can have is best thought of as procedural memory, rather than semantic or episodic. It is used only to directly determine plant behavior. A tree does not muse about the meaning of the events in its life like we can.
When a sunflower tracks the sun, it has to stop moving when the sun is obscured. It has no representation of the sun’s path it can use to anticipate where it will be later. It has no memories to draw on to do this.
The venus flytrap has hairs around its trap to detect the presence of a bug. But sometimes plants are casually bumped. It takes enormous energy for the flytrap to close its trap, and hours to open it again, so it evolved ways to detect whether the stimulation on the hairs are caused by an actual bug in the trap, versus some other kind of touch that’s not worth closing for, like a raindrop or a fallen twig. Studies show that two different hairs on the trap have to be activated within about 20 seconds of each other. Only then will the trap close. Not only is this a sense of touch, but also a sense of time and a primitive memory, albeit one that only lasts 20 seconds.

## Cellular Memory
### DNA

Memory even seems to happen in some cells. DNA, for example, changes the chemical marks on itself in response to the environment, showing that memory can even happen at a molecular level. A frightening example of this happened in recent history. In 1944, during World War II, German troops stopped food delivery to the northern parts of the Netherlands. The starvation went on for about a year. When the Netherlands faced starvation, the genetic effects were felt two generations later: problems with depression, heart disease, diabetes, and other medical ailments. This shows that there can be a genetic memory.
Some plants also seem to have a memory that can be passed on through multiple generations. Putting stress on plants, say, extreme cold, causes an epigenetic change that affects the plant’s offspring.

### Immune System Memory

Humans and other animals have an immune memory, which is how our immune system remembers past infections to help it fight ones it will encounter in the future. This is another great example of memory that isn't stored in the brain.
* ↑ Walker, M. (2017). Why we sleep: Unlocking the power of sleep and dreams. New York, NY: Simon & Schuster.
* ↑ Chamovitz, D. (2012). What a plant knows: A field guide to the senses. Scientific American: New York. Page 132.
* ↑ Dennett, D.C. (1991). Consciousness Explained. Boston, MA: Little, Brown and Company. Page 191.
* ↑ Chamovitz, D. (2012). What a plant knows: A field guide to the senses. Scientific American: New York. Pages 50--63.
* ↑ Mukherjee, S. (2016). The Gene: An Intimate History. Simon & Schuster.
* ↑ Chamovitz, D. (2012). What a plant knows: A field guide to the senses. Scientific American: New York. Page 129.
* ↑ Chamovitz, D. (2012). What a plant knows: A field guide to the senses. Scientific American: New York. Page 116.