39 Commits

Author SHA1 Message Date
github-actions[bot] 418ada9bfc 🤖 Web developer stuff 2025-07-06 17:52:02 +00:00
github-actions[bot] 4a86f61453 🤖 Web developer stuff 2025-02-25 16:32:35 +00:00
github-actions[bot] 1ddaeacfd4 🤖 Web developer stuff 2025-02-23 12:46:33 +00:00
github-actions[bot] b2be8c621a 🤖 Web developer stuff 2024-12-14 20:55:30 +00:00
github-actions[bot] e2fa93d156 🤖 Web developer stuff 2024-10-02 17:40:26 +00:00
github-actions[bot] 8cf7b7badf 🤖 Web developer stuff 2024-09-23 16:29:05 +00:00
github-actions[bot] c700025905 🤖 Web developer stuff 2024-09-20 13:30:05 +00:00
github-actions[bot] 36d31e1087 🤖 Web developer stuff 2024-09-17 16:26:09 +00:00
github-actions[bot] d72ac37be7 🤖 Web developer stuff 2024-09-16 12:29:03 +00:00
github-actions[bot] 9fbcfdc769 🤖 Web developer stuff 2024-06-16 17:51:05 +00:00
github-actions[bot] 98c793e2e1 🤖 Web developer stuff 2024-06-16 17:48:24 +00:00
github-actions[bot] 1a721eabf1 🤖 Web developer stuff 2024-06-16 15:36:03 +00:00
github-actions[bot] 5986454b73 🤖 Web developer stuff 2024-06-16 15:33:26 +00:00
github-actions[bot] eb95be9165 🤖 Web developer stuff 2024-06-15 12:22:39 +00:00
github-actions[bot] 9413b8de8c 🤖 Web developer stuff 2024-06-15 12:20:22 +00:00
github-actions[bot] 63d5be5690 🤖 Web developer stuff 2024-06-14 12:20:17 +00:00
github-actions[bot] fb67ef591e 🤖 Web developer stuff 2024-06-14 12:17:33 +00:00
github-actions[bot] 20a7adf4a7 🤖 Web developer stuff 2024-06-10 09:15:31 +00:00
github-actions[bot] 0d07afbd09 🤖 Web developer stuff 2024-06-10 09:11:42 +00:00
github-actions[bot] afc222df66 🤖 Web developer stuff 2024-06-09 17:24:01 +00:00
github-actions[bot] 3f214bf7ce 🤖 Web developer stuff 2024-06-09 17:19:01 +00:00
github-actions[bot] 9d2623402e 🤖 Web developer stuff 2024-06-03 20:45:38 +00:00
github-actions[bot] 5591cf59ec 🤖 Web developer stuff 2024-06-03 20:42:56 +00:00
github-actions[bot] e9e66c9a93 🤖 Web developer stuff 2024-06-03 13:56:10 +00:00
github-actions[bot] 6e5d93edd0 🤖 Web developer stuff 2024-06-03 13:52:50 +00:00
github-actions[bot] b94610c60e 🤖 Web developer stuff 2024-06-03 13:51:54 +00:00
github-actions[bot] 24278a80e9 🤖 Web developer stuff 2024-06-03 13:33:49 +00:00
github-actions[bot] c3c3e6d957 🤖 Web developer stuff 2024-06-03 13:29:17 +00:00
github-actions[bot] 5b0b2fb4c7 🤖 Web developer stuff 2024-06-02 20:34:59 +00:00
github-actions[bot] 4e283e733c 🤖 Web developer stuff 2024-06-02 20:27:48 +00:00
github-actions[bot] fd5742ac37 🤖 Web developer stuff 2024-06-02 09:39:31 +00:00
github-actions[bot] 5ff6d7b41c 🤖 Web developer stuff 2024-06-02 09:32:41 +00:00
github-actions[bot] e2a3777ee4 🤖 Web developer stuff 2024-06-02 08:51:26 +00:00
github-actions[bot] c9930e38ca 🤖 Web developer stuff 2024-06-02 08:44:23 +00:00
github-actions[bot] 261ca2d4ee 🤖 Web developer stuff 2024-05-31 06:16:31 +00:00
github-actions[bot] 0dd0895c77 🤖 Web developer stuff 2024-05-30 08:14:07 +00:00
github-actions[bot] 3c2cb9c6ec 🤖 Web developer stuff 2024-05-30 08:11:52 +00:00
github-actions[bot] 1c0c605d85 🤖 Web developer stuff 2024-05-30 07:00:04 +00:00
notxia 604eb7fc5d Initial commit 2024-05-30 08:52:13 +02:00
1366 changed files with 77 additions and 188616 deletions
-68
View File
@@ -1,68 +0,0 @@
import argparse
from read_metadata import readMetadata
import re
import os
# from pathlib import Path
# import shutil
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="Web viewer formatter")
parser.add_argument("--src-path", type=str, required=True, help="Path to the .tex sources (for metadata)")
parser.add_argument("--out-path", type=str, required=True, help="Path of the output directory")
parser.add_argument("--gh-raw-pdf-url", type=str, required=True, help="Base URL of Github raw pdfs")
# parser.add_argument("--pdfs-path", type=str, required=True, help="Path of the pdfs directory")
parser.add_argument("--template-path", type=str, default="./web-viewer", help="Path to the templates")
args = parser.parse_args()
notes_metadata = readMetadata(args.src_path)
table_of_content = ""
url_pdf_dir = "pdfs"
dest_pdf_dir = os.path.join(args.out_path, url_pdf_dir)
with open(os.path.join(args.template_path, "index.html"), "r") as f: index_template = f.read()
# with open(os.path.join(args.template_path, "view.html"), "r") as f: viewer_template = f.read()
os.makedirs(args.out_path, exist_ok=True)
# shutil.copytree(args.pdfs_path, dest_pdf_dir, dirs_exist_ok=True)
# Generate home page content
for year in sorted(notes_metadata.keys()):
for semester in sorted(notes_metadata[year].keys()):
for course in sorted(notes_metadata[year][semester]):
course_name = notes_metadata[year][semester][course]["name"]
course_content = notes_metadata[year][semester][course]["content"]
if (len(course_content) == 1) and (course_content[0]["name"] is None):
table_of_content += f"<h3><a href='{os.path.join(args.gh_raw_pdf_url, course_content[0]['url'])}'>{course_name}</a></h3>\n"
else:
table_of_content += f"<h3>{course_name}</h3>\n"
table_of_content += "<ul>\n"
for content in course_content:
table_of_content += f"<li><h4><a href='{os.path.join(args.gh_raw_pdf_url, content['url'])}'>{content['name']}</a></h4></li>\n"
table_of_content += "</ul>\n"
with open(os.path.join(args.out_path, "index.html"), "w") as f:
f.write(
re.sub(
r"<!-- begin-toc -->[\s\S]*<!-- end-toc -->",
f"<!-- begin-toc -->\n{table_of_content}\n<!-- end-toc -->",
index_template
)
)
# Generate viewer content
# for year in notes_metadata.keys():
# for semester in notes_metadata[year].keys():
# for course in notes_metadata[year][semester]:
# course_name = notes_metadata[year][semester][course]["name"]
# course_content = notes_metadata[year][semester][course]["content"]
# for content in course_content:
# content_local_path = os.path.join(url_pdf_dir, content["url"])
# content_html_name = f"{Path(content['url']).stem}.html"
# with open(os.path.join(args.out_path, content_html_name), "w") as f:
# page_content = re.sub(r"{{pdf-path}}", f"{content_local_path}", viewer_template)
# page_content = re.sub(r"{{course-name}}", f"{Path(content['url']).name}", page_content)
# f.write(page_content)
-30
View File
@@ -1,30 +0,0 @@
import os
import json
def readMetadata(src_path, gh_link="", metadata_file_name="metadata.json"):
notes_metadata = {}
# Reads courses metadata
for root, _, files in os.walk(src_path):
if metadata_file_name in files:
with open(os.path.join(root, metadata_file_name)) as f:
metadata = json.load(f)
dir_name = os.path.relpath(root, src_path)
gh_path = os.path.join(gh_link, dir_name)
if metadata["year"] not in notes_metadata: notes_metadata[metadata["year"]] = {}
if metadata["semester"] not in notes_metadata[metadata["year"]]: notes_metadata[metadata["year"]][metadata["semester"]] = {}
notes_metadata[metadata["year"]][metadata["semester"]][metadata["name"]] = {
"name": metadata["name"],
"content": [
{
"name": pdf["name"],
"url": os.path.join(gh_path, pdf["path"])
}
for pdf in metadata["pdfs"]
]
}
return notes_metadata
-94
View File
@@ -1,94 +0,0 @@
import argparse
from read_metadata import readMetadata
import re
import subprocess
def get_contributors(dir=".", filter_usernames=["NotXia"]):
contributors = {}
regex_gh_noreply1 = re.compile(r"\s*(?P<commits>\d+)\s+(?P<fullname>.+) <(?P<email>\d+\+(?P<username>.+)@users\.noreply\.github\.com)>")
regex_gh_noreply2 = re.compile(r"\s*(?P<commits>\d+)\s+(?P<fullname>.+) <(?P<email>(?P<username>.+)@users\.noreply\.github\.com)>")
regex_fallback = re.compile(r"\s*(?P<commits>\d+)\s+(?P<fullname>.+) <(?P<email>.+@.+\.\w+)>")
p1 = subprocess.Popen(["git", "log"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["git", "shortlog", "-n", "-s", "-e"], stdin=p1.stdout, stdout=subprocess.PIPE)
result = p2.communicate()[0].decode("utf-8").strip()
if len(result) == 0: return []
for l in result.split("\n"):
if ((res := regex_gh_noreply1.search(l)) != None) or ((res := regex_gh_noreply2.search(l)) != None):
email = res.group("email")
username = res.group("username")
fullname = res.group("fullname")
commits = int(res.group("commits"))
elif (res := regex_fallback.search(l)) != None:
email = res.group("email")
username = None
fullname = res.group("fullname")
commits = int(res.group("commits"))
if username in filter_usernames:
continue
if email not in contributors:
contributors[email] = {
"gh_username": None,
"fullnames": [],
"commits": 0,
}
contributors[email]["gh_username"] = username
contributors[email]["fullnames"].append(fullname)
contributors[email]["commits"] += commits
contributors = list(contributors.values())
contributors.sort(key=lambda x: x["commits"], reverse=True)
return contributors
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="README updater")
parser.add_argument("--src-path", type=str, required=True, help="Path to the .tex sources")
parser.add_argument("--readme-path", type=str, required=True, help="Path to the readme")
parser.add_argument("--gh-link", type=str, required=True, help="Link to the GitHub repo")
args = parser.parse_args()
# Adds ToC to README
notes_metadata = readMetadata(args.src_path, args.gh_link)
with open(args.readme_path, "a") as readme_f:
readme_f.write(f"\n\n## Table of contents\n")
for year in sorted(notes_metadata.keys()):
readme_f.write(f"\n### Year {year}\n")
for semester in sorted(notes_metadata[year].keys()):
for course in sorted(notes_metadata[year][semester]):
course_name = notes_metadata[year][semester][course]["name"]
course_content = notes_metadata[year][semester][course]["content"]
if (len(course_content) == 1) and (course_content[0]["name"] is None):
readme_f.write(f"- [**{course_name}**]({course_content[0]['url']})\n")
else:
readme_f.write(f"- **{course_name}**\n")
for content in course_content:
readme_f.write(f" - [{content['name']}]({content['url']})\n")
# Adds contributors to README
contributors = get_contributors(args.src_path)
with open(args.readme_path, "a") as readme_f:
readme_f.write(f"\n\n## Contributors\n")
readme_f.write(f"Special thanks for the help to:\n\n")
contributors_strs = []
for i in range(len(contributors)):
if contributors[i]["gh_username"] is not None:
contributors_strs.append(
f"[![{contributors[i]['gh_username']}]("
f"https://images.weserv.nl/?url=https://github.com/{contributors[i]['gh_username']}.png&h=50&w&50&mask=circle&fit=cover&maxage=1d"
f")](https://github.com/{contributors[i]['gh_username']})"
)
elif len(contributors[i]["fullnames"]) > 0:
contributors_strs.append(f"{contributors[i]['fullnames'][-1]}")
readme_f.write("$\\hspace{1em}$".join(contributors_strs))
-38
View File
@@ -1,38 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<title>M.Sc. AI notes</title>
<style>
* {
font-family: monospace, monospace;
}
@media (prefers-color-scheme: light) {
* {
color: black;
background-color: white;
}
}
@media (prefers-color-scheme: dark) {
* {
color: white;
background-color: #292929;
}
}
</style>
</head>
<body>
<h1>Unibo Master's degree in AI - Notes</h1>
<h2>Table of contents</h2>
<!-- begin-toc -->
<!-- end-toc -->
</body>
</html>
-23
View File
@@ -1,23 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{course-name}}</title>
<style>
html, body {
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
</head>
<body style="height: 100vh; width: 100vw;">
<object data="{{pdf-path}}" type="application/pdf" width="100%" height="100%">
<p>
There has been an error. View the pdf <a href="{{pdf-path}}">here</a>
</p>
</object>
</body>
</html>
-65
View File
@@ -1,65 +0,0 @@
name: Compile LaTeX
on:
push:
branches:
- main
paths: [
"src/**",
.github/update_readme.py,
.github/read_metadata.py,
.github/workflows/compile.yml,
compile.sh
]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
compile:
name: Compile notes
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout current pdfs branch
uses: actions/checkout@v4
with:
ref: pdfs
path: .currpdfs
- name: Prepare output directory
run: |
mkdir ${GITHUB_WORKSPACE}/.compiled
cp ${GITHUB_WORKSPACE}/LICENSE-pdf ${GITHUB_WORKSPACE}/.compiled/LICENSE
- name: Compile
run: |
docker pull ghcr.io/notxia/unibo-ai-notes:main
docker run -v ${GITHUB_WORKSPACE}:/notes ghcr.io/notxia/unibo-ai-notes:main
- name: Generate README
run: |
cp README.md .compiled/README.md
python3 ${GITHUB_WORKSPACE}/.github/update_readme.py \
--src-path ${GITHUB_WORKSPACE}/src \
--readme-path ${GITHUB_WORKSPACE}/.compiled/README.md \
--gh-link https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs
- name: Move to pdfs branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: pdfs
FOLDER: .compiled
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_NAME: "github-actions[bot]"
COMMIT_EMAIL: "github-actions[bot]@users.noreply.github.com"
MESSAGE: "🤖 Hello human, trying to not break anything ({sha})"
SKIP_EMPTY_COMMITS: true
-49
View File
@@ -1,49 +0,0 @@
name: Create and publish Docker image
on:
push:
branches:
- main
paths: [
Dockerfile
]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Container registry login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-42
View File
@@ -1,42 +0,0 @@
name: Setup web viewer
on:
push:
branches:
- main
paths: [
"src/**",
.github/prepare_web_viewer.py,
.github/workflows/web.yml,
]
jobs:
compile:
name: Format web pages
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate web viewer content
run: |
python3 ${GITHUB_WORKSPACE}/.github/prepare_web_viewer.py \
--src-path=${GITHUB_WORKSPACE}/src \
--out-path=/tmp/webviewer \
--template-path=${GITHUB_WORKSPACE}/.github/web-viewer \
--gh-raw-pdf-url="https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs"
- name: Move to pages branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: pages
FOLDER: /tmp/webviewer
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_NAME: "github-actions[bot]"
COMMIT_EMAIL: "github-actions[bot]@users.noreply.github.com"
MESSAGE: "🤖 Web developer stuff"
SKIP_EMPTY_COMMITS: true
-19
View File
@@ -1,19 +0,0 @@
*.synctex.gz
*.synctex(busy)
*.log
*.fls
*.fdb_latexmk
*.aux
*.toc
*.out
*.bbl
*.bcf
*.blg
*.run.xml
[!_]*.pdf
.compiled
__pycache__
.vscode
-10
View File
@@ -1,10 +0,0 @@
FROM archlinux:latest
WORKDIR /notes
RUN pacman --noconfirm -Syu && pacman --noconfirm -S git texlive-basic texlive-latex texlive-binextra texlive-mathscience texlive-latexextra texlive-fontsextra texlive-bibtexextra biber perl perl-mozilla-ca
RUN ln -s /usr/bin/vendor_perl/biber /usr/bin/biber
RUN git config --global --add safe.directory /notes
CMD ["bash", "./utils/compile.sh", "./src", "./.compiled", "./.currpdfs"]
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Tian Cheng Xia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-427
View File
@@ -1,427 +0,0 @@
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
-8
View File
@@ -1,8 +0,0 @@
# Unibo M.Sc. AI Notes
My notes for the courses of the Master's Degree in Artificial Intelligence at the University of Bologna.
LaTeX source files are in the [`main` branch](https://github.com/NotXia/unibo-ai-notes/tree/main).\
Compiled PDF files are in the [`pdfs` branch](https://github.com/NotXia/unibo-ai-notes/tree/pdfs).
**Note**: I'm terrible at taking notes. Please, consider ~~double~~ triple checking anything you plan to use.
+77
View File
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<title>M.Sc. AI notes</title>
<style>
* {
font-family: monospace, monospace;
}
@media (prefers-color-scheme: light) {
* {
color: black;
background-color: white;
}
}
@media (prefers-color-scheme: dark) {
* {
color: white;
background-color: #292929;
}
}
</style>
</head>
<body>
<h1>Unibo Master's degree in AI - Notes</h1>
<h2>Table of contents</h2>
<!-- begin-toc -->
<h3>Fundamentals of Artificial Intelligence and Knowledge Representation</h3>
<ul>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/fundamentals-of-ai-and-kr/module1/faikr1.pdf'>FAIKR module 1</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/fundamentals-of-ai-and-kr/module2/faikr2.pdf'>FAIKR module 2</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/fundamentals-of-ai-and-kr/module3/faikr3.pdf'>FAIKR module 3</a></h4></li>
</ul>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/machine-learning-and-data-mining/dm-ml.pdf'>Machine Learning and Data Mining</a></h3>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/statistical-and-mathematical-methods-for-ai/smm.pdf'>Statistical and Mathematical Methods for Artificial Intelligence</a></h3>
<h3>Cognition and Neuroscience</h3>
<ul>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/cognition-and-neuroscience/module1/cn1.pdf'>CN module 1</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/cognition-and-neuroscience/module2/cn2.pdf'>CN module 2</a></h4></li>
</ul>
<h3>Combinatorial Decision Making and Optimization</h3>
<ul>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/combinatorial-decision-making-and-optimization/module1/cdmo1.pdf'>CDMO module 1</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/combinatorial-decision-making-and-optimization/module2/cdmo2.pdf'>CDMO module 2</a></h4></li>
</ul>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/deep-learning/dl.pdf'>Deep Learning</a></h3>
<h3>Image Processing and Computer Vision</h3>
<ul>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/image-processing-and-computer-vision/module1/ipcv1.pdf'>IPCV module 1</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/image-processing-and-computer-vision/module2/ipcv2.pdf'>IPCV module 2</a></h4></li>
</ul>
<h3>Languages and Algorithms for Artificial Intelligence</h3>
<ul>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/languages-and-algorithms-for-ai/module2/laai2.pdf'>LAAI module 2</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year1/languages-and-algorithms-for-ai/module3/laai3.pdf'>LAAI module 3</a></h4></li>
</ul>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year2/artificial-intelligence-in-industry/a3i.pdf'>Artificial Intelligence in Industry</a></h3>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year2/machine-learning-for-computer-vision/ml4cv.pdf'>Machine Learning for Computer Vision</a></h3>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year2/natural-language-processing/nlp.pdf'>Natural Language Processing</a></h3>
<h3><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year2/distributed-autonomous-systems/das.pdf'>Distributed Autonomous Systems</a></h3>
<h3>Ethics in Artificial Intelligence</h3>
<ul>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year2/ethics-in-ai/module1/ethics1.pdf'>Ethics module 1</a></h4></li>
<li><h4><a href='https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs/year2/ethics-in-ai/module2/ethics2.pdf'>Ethics module 2</a></h4></li>
</ul>
<!-- end-toc -->
</body>
</html>
-150
View File
@@ -1,150 +0,0 @@
\NeedsTeXFormat{LaTeX2e}[]
\ProvidesClass{ainotes}
\LoadClass{scrreprt}
\usepackage{geometry}
\usepackage{graphicx, xcolor}
\usepackage{amsmath, amsfonts, amssymb, amsthm, mathtools, bm, upgreek, cancel, bbm, siunitx, thmtools}
\usepackage[bottom]{footmisc}
\usepackage[pdfusetitle]{hyperref}
\usepackage[nameinlink]{cleveref}
\usepackage[all]{hypcap} % Links hyperref to object top and not caption
\usepackage[inline]{enumitem}
\usepackage{marginnote}
\usepackage{scrlayer-scrpage}
\usepackage{scrhack, algorithm, listings}
\usepackage{array, makecell, multirow, booktabs}
\usepackage{acro}
\usepackage{subcaption}
\usepackage{eurosym}
\usepackage{bussproofs} % Deductive tree
\usepackage{varwidth}
\usepackage[most]{tcolorbox}
\usepackage{tikz}
\tcbuselibrary{breakable}
\usetikzlibrary{decorations.pathmorphing,calc}
\geometry{ margin=3cm, lmargin=1.5cm, rmargin=4.5cm, marginparwidth=3cm }
\hypersetup{ colorlinks, citecolor=black, filecolor=black, linkcolor=black, urlcolor=black, linktoc=all }
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
commentstyle = \color{codegreen},
keywordstyle = \color{magenta},
numberstyle = \tiny\color{codegray},
stringstyle = \color{codepurple},
basicstyle = \footnotesize\ttfamily,
breakatwhitespace = false,
breaklines = true,
captionpos = b,
keepspaces = true,
numbers = none,
showspaces = false,
showstringspaces = true,
showtabs = false,
tabsize = 3
}
\lstset{style=mystyle}
\lstset{language=Python}
\NewDocumentEnvironment{descriptionlist}{}{%
\begin{description}[labelindent=1em]
}{
\end{description}%
}
\setlength{\parindent}{0pt}
\renewcommand*{\marginfont}{\color{gray}\footnotesize}
\renewcommand*\chapterpagestyle{scrheadings} % Header in chapter pages
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem*{privateexample}{Example}
\theoremstyle{definition}
\newtheorem*{definition}{Def}
\newtheorem*{privateremark}{Remark}
\newtcolorbox{marginbar}[3]{ % #1: color | #2: (number of lines - 1) | #3: line thickness
enhanced, blank, breakable,
overlay = {
\foreach \t in {0,...,#2}{
\draw[decorate, #3, #1]
([xshift=-3-\t mm]frame.north west)
--
([xshift=-3-\t mm]frame.south west);
}
}
}
\newenvironment{example}{%
\begin{marginbar}{lightgray}{0}{thick}
\begin{privateexample}
}{%
\end{privateexample}
\end{marginbar}
}
\newenvironment{remark}{%
\begin{marginbar}{darkgray}{0}{thick}
\begin{privateremark}
}{%
\end{privateremark}
\end{marginbar}
}
\def\indenttbox{\hangindent0.5em\hangafter=0}
\newcommand{\ubar}[1]{\text{\b{$#1$}}}
\renewcommand{\vec}[1]{{\bm{\mathbf{#1}}}}
\newcommand{\nullvec}[0]{\bar{\vec{0}}}
\newcommand{\matr}[1]{{\bm{#1}}}
\newcommand{\prob}[1]{{\mathcal{P}\left({#1}\right)}}
\renewcommand*{\maketitle}{%
\begin{titlepage}
\newgeometry{margin=3cm}
\centering
\vspace*{\fill}
\huge
\href{\giturl}{\textbf{\@title}}\\
{\Large Last update: \lastupdate}
\vspace*{\fill}
\Large
Academic Year \@date\\
Alma Mater Studiorum $\cdot$ University of Bologna
\vspace*{1cm}
\restoregeometry
\end{titlepage}
\newpage
}
\newcommand*{\makenotesfront}{%
\newgeometry{margin=3cm}
\maketitle
\pagenumbering{roman}
\tableofcontents
\restoregeometry
\newpage
\pagenumbering{arabic}
}
\newcommand{\gitFAIKROne}[0]{ https://github.com/NotXia/unibo-ai-notes/tree/pdfs/year1/fundamentals-of-ai-and-kr/module1 }
\newcommand{\gitFAIKRTwo}[0]{ https://github.com/NotXia/unibo-ai-notes/tree/pdfs/year1/fundamentals-of-ai-and-kr/module2 }
\newcommand{\gitFAIKRThree}[0]{ https://github.com/NotXia/unibo-ai-notes/tree/pdfs/year1/fundamentals-of-ai-and-kr/module3 }
\newcommand{\gitLAAITwo}[0]{ https://github.com/NotXia/unibo-ai-notes/tree/pdfs/year1/languages-and-algorithms-for-ai/module2 }
\newcommand{\gitMLDM}[0]{ https://github.com/NotXia/unibo-ai-notes/tree/pdfs/year1/machine-learning-and-data-mining }
\newcommand{\gitSMM}[0]{ https://github.com/NotXia/unibo-ai-notes/tree/pdfs/year1/statistical-and-mathematical-methods-for-ai }
\newcommand{\eoc}[0]{\begin{flushright}\texttt{\raggedleft\small <end of course>}\end{flushright}}
@@ -1,15 +0,0 @@
{
"name": "Cognition and Neuroscience",
"year": 1,
"semester": 2,
"pdfs": [
{
"name": "CN module 1",
"path": "module1/cn1.pdf"
},
{
"name": "CN module 2",
"path": "module2/cn2.pdf"
}
]
}
@@ -1 +0,0 @@
../../../ainotes.cls
@@ -1,43 +0,0 @@
\documentclass[11pt]{ainotes}
\title{Cognition and Neuroscience\\(Module 1)}
\date{2023 -- 2024}
\def\lastupdate{{PLACEHOLDER-LAST-UPDATE}}
\def\giturl{{PLACEHOLDER-GIT-URL}}
\DeclareAcronym{psp}{short=PSP, long=postsynaptic potential, long-plural=s}
\DeclareAcronym{epsp}{short=EPSP, long=excitatory postsynaptic potential, long-plural=s}
\DeclareAcronym{ipsp}{short=IPSP, long=inhibitory postsynaptic potential, long-plural=s}
\DeclareAcronym{ap}{short=AP, long=action potential, long-plural=s}
\DeclareAcronym{cns}{short=CNS, long=central nervous system}
\DeclareAcronym{pns}{short=PNS, long=peripheral nervous system}
\DeclareAcronym{rl}{short=RL, long=reinforcement learning}
\DeclareAcronym{nr}{short=NR, long=no response}
\DeclareAcronym{us}{short=US, long=unconditioned stimulus}
\DeclareAcronym{ur}{short=UR, long=unconditioned response}
\DeclareAcronym{cs}{short=CS, long=conditioned stimulus}
\DeclareAcronym{cr}{short=CR, long=conditioned response}
\newtheorem*{privatecasestudy}{Case study}
\newenvironment{casestudy}{%
\begin{marginbar}{olive}{0}{thick}
\begin{privatecasestudy}
}{%
\end{privatecasestudy}
\end{marginbar}
}
\begin{document}
\makenotesfront
\printacronyms
\newpage
\input{./sections/_introduction.tex}
\input{./sections/_nervous_system.tex}
\input{./sections/_rl.tex}
\input{./sections/_pavlovian_learning.tex}
\input{./sections/_instrumental_learning.tex}
\eoc
\end{document}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 975 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

@@ -1,605 +0,0 @@
\chapter{Instrumental/operant learning}
Form of control learning that aims to learn action-outcome associations:
\begin{itemize}
\item When a reinforcer is likely to occur.
\item Which actions bring to those reinforcers.
\end{itemize}
This allows the animal to act in anticipation of a reinforcer.
Instrumental learning includes:
\begin{descriptionlist}
\item[Habitual system] \marginnote{Habitual system}
Learn to repeat previously successful actions.
\item[Goal-directed system] \marginnote{Goal-directed system}
Evaluate actions based on their anticipated consequences.
\end{descriptionlist}
Depending on the outcome, the effect varies:
\begin{descriptionlist}
\item[Positive reinforcement] \marginnote{Positive reinforcement}
Delivering an appetitive outcome to an action increases the probability of emitting it.
\item[Positive punishment] \marginnote{Positive punishment}
Delivering an aversive outcome to an action decreases the probability of emitting it.
\item[Negative reinforcement] \marginnote{Negative reinforcement}
Omitting an aversive outcome to an action increases the probability of emitting it.
\item[Negative punishment] \marginnote{Negative punishment}
Omitting an appetitive outcome to an action decreases the probability of emitting it.
\end{descriptionlist}
\begin{table}[H]
\centering
\begin{tabular}{r|cc}
\toprule
& \textbf{Delivery} & \textbf{Omission} \\
\midrule
\textbf{Appetitive} & Positive reinforcement (\texttt{+prob}) & Negative punishment (\texttt{-prob}) \\
\textbf{Aversive} & Positive punishment (\texttt{-prob}) & Negative reinforcement (\texttt{+prob}) \\
\bottomrule
\end{tabular}
\caption{Summary of the possible effects}
\end{table}
\section{Types of schedule}
There are two types of learning:
\begin{descriptionlist}
\item[Continuous schedule] \marginnote{Continuous schedule}
The desired action is followed by the outcome every time.
\begin{remark}
More effective to teach a new association.
\end{remark}
\item[Partial schedule] \marginnote{Partial schedule}
The desired action is not always followed by the outcome.
\begin{remark}
Learning is slower but the response is more resistant to extinction.
\end{remark}
There are four types of partial schedules:
\begin{descriptionlist}
\item[Fixed-ratio]
Outcome available after a specific number of responses.
This results in a high and steady rate of response, with a brief pause after the outcome is delivered.
\item[Variable-ratio]
Outcome available after an unpredictable number of responses.
This results in a high and steady rate of response.
\item[Fixed-interval]
Outcome available after a specific interval of time.
This results in a high rate of response near the end of the interval and a slowdown after the outcome is delivered.
\item[Variable-interval]
Outcome available after an unpredictable interval of time.
This results in a slow and steady rate of response.
\end{descriptionlist}
\end{descriptionlist}
\begin{minipage}{0.55\linewidth}
\begin{casestudy}[Aplysia Californica]
An Aplysia Californica will withdraw its gill upon stimulating the siphon.
\begin{itemize}
\item Repeated mild stimulations will induce a habituation of the reflex.
\item Repeated intense stimulations will induce a sensitization of the reflex.
\end{itemize}
\end{casestudy}
\end{minipage}
\begin{minipage}{0.4\linewidth}
\centering
\includegraphics[width=0.9\linewidth]{./img/gill_habituation.png}
\end{minipage}
\section{Dopamine}
There is evidence that dopamine is involved in learning action-outcome associations.
\begin{description}
\item[Striatal activity on unexpected events] \marginnote{Striatal activity on unexpected events}
When an unexpected event happens, there is a change in the activity of the striatum.
There is an increase in response when the feedback is positive and a decrease when negative.
\begin{casestudy}[Microelectrodes in substantia nigra]
\phantom{}\\
\begin{minipage}{0.7\linewidth}
The activity of the substantia nigra of patients with Parkinson's disease is measured during a probabilistic instrumental learning task.
The task consists of repeatedly drawing a card from two decks, followed by positive or negative feedback depending on the deck.
\end{minipage}
\begin{minipage}{0.28\linewidth}
\centering
\includegraphics[width=0.95\linewidth]{./img/instrumental_dopamine_sn1.png}
\end{minipage}
The increase and decrease in striatal activity can be clearly seen when the feedback is unexpected.
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{./img/instrumental_dopamine_sn2.png}
\end{figure}
\end{casestudy}
\item[Dopamine effect on behavior] \marginnote{Dopamine effect on behavior}
The amount of dopamine changes the learning behavior:
\begin{itemize}
\item Low levels of dopamine cause an impairment in learning from positive feedback.
This happens because positive prediction errors cannot occur.
\item High levels of dopamine cause an impairment in learning from negative feedback.
This happens because negative prediction errors cannot occur.
\end{itemize}
\begin{casestudy}[Probabilistic selection task]
This instrumental learning task has two phases:
\begin{descriptionlist}
\item[Learning]
There are three pairs of stimuli (symbols) and, at each trial, a pair is presented to the participant who selects one.
For each pair, a symbol has a higher probability of providing positive feedback while the other is more likely to be negative.
Moreover, the probabilities are different among the three pairs.
\begin{center}
\includegraphics[width=0.55\linewidth]{./img/instrumental_dopamine_selection1.png}
\end{center}
Participants are required to learn by trial and error the stimulus in each pair that leads to a positive reward.
Note that learning could be accomplished by:
\begin{itemize}
\item Recognizing the more rewarding stimulus.
\item Recognizing the less rewarding stimulus.
\item Both.
\end{itemize}
\item[Testing]
Aims to assess if participants learned to select positive feedback or avoid negative feedback.
The same task as above is repeated but all combinations of the stimuli among the three pairs are possible.
\end{descriptionlist}
Three groups of participants are considered for this experiment:
\begin{enumerate}
\item Those who took the cabergoline drug (dopamine antagonist).
\item Those who took the haloperidol drug (dopamine agonist).
\item Those who took a drug without effects (placebo).
\end{enumerate}
\begin{center}
\includegraphics[width=0.55\linewidth]{./img/instrumental_dopamine_selection2.png}
\end{center}
Results show that:
\begin{enumerate}
\item Cabergoline inhibited positive feedback learning.
\item Haloperidol enhanced positive feedback learning.
\item Placebo learned positive and negative feedback equally.
\end{enumerate}
\end{casestudy}
\begin{casestudy}
It has been observed that:
\begin{itemize}
\item Reward prediction errors are correlated with activity in the left posterior putamen and left ventral striatum.
\item Punishment prediction errors are correlated with activity in the right anterior insula.
\end{itemize}
\begin{center}
\includegraphics[width=0.5\linewidth]{./img/pe_location.png}
\end{center}
\end{casestudy}
\item[Actor-critic model] \marginnote{Actor-critic model}
Model to correlate Pavlovian and instrumental learning.
It is composed by:
\begin{itemize}
\item The cortex is responsible for representing the current state.
\item The basal ganglia implement two computational models:
\begin{descriptionlist}
\item[Critic] \marginnote{Critic}
Learns stimulus-outcome associations and is active in both Pavlovian and instrumental learning.
It might be implemented in the ventral striatum, the amygdala and the orbitofrontal cortex.
\item[Actor] \marginnote{Actor}
Learns stimulus-action associations and is only active during instrumental learning.
It might be implemented in the dorsal striatum.
\end{descriptionlist}
\end{itemize}
\end{description}
\begin{casestudy}[Food and cocaine]
\phantom{}
\begin{itemize}
\item Food-induced dopamine response is modulated by the reward expectations that promote learning until the prediction matches the actual outcome.
\item Cocaine-induced dopamine response causes a continuous increase in the predicted reward that
will eventually surpass all other cues and bias decision-making towards cocaine.
\end{itemize}
\begin{center}
\includegraphics[width=0.8\linewidth]{./img/dopamine_food_cocaine.png}
\end{center}
\end{casestudy}
\section{Learning strategies historical evolution}
% Instrumental learning can happen in two ways:
% \begin{descriptionlist}
% \item[Cognitive map] \marginnote{Cognitive map}
% Actions are taken based on the expected reward.
% \item[Response strategy] \marginnote{Response strategy}
% Actions are associated with particular stimuli.
% \end{descriptionlist}
\subsection{Generation 0}
There were two possible learning strategies:
\begin{descriptionlist}
\item[Stimulus-response theory] \marginnote{Stimulus-response theory}
Learning happens by creating stimulus-response associations.
Learning does not happen if there is no reward.
\item[Cognitive map / Field theory] \marginnote{Cognitive map / Field theory}
A mental map is created and used to find the best action in a given state based on the expected reward.
\begin{description}
\item[Latent learning] \marginnote{Latent learning}
Learning that is not shown behaviorally unless there is enough motivation.
\end{description}
\end{descriptionlist}
\begin{casestudy}[Maze]
An animal is put at the start of a maze where a reward is located in the west arm.
After some training iterations, the animal is put at the other entrance:
\begin{itemize}
\item If it goes to the west arm, it learned to solve the maze using a cognitive map/place strategy.
\item If it goes to the east arm, it learned to solve the maze using a stimulus-response strategy.
\end{itemize}
\begin{center}
\includegraphics[width=0.55\linewidth]{./img/instrumental_maze.png}
\end{center}
It has been observed that rats start by learning a cognitive map (i.e. the environment is unknown).
After enough training, they start relying on a response strategy (i.e. the environment is stable).
\end{casestudy}
\begin{casestudy}[Tolman's maze]
Consider a maze with curtains and doors to prevent a long-distance perspective.
\begin{center}
\includegraphics[width=0.35\linewidth]{./img/tolman_maze.png}
\end{center}
Two groups of hungry rats have been considered to solve the maze:
\begin{descriptionlist}
\item[Group 1] No reward for solving the maze.
\item[Group 2] Reward for solving the maze.
\end{descriptionlist}
It has been shown that the second group completes the maze faster.
\begin{center}
\includegraphics[width=0.45\linewidth]{./img/tolman_experiment1.png}
\end{center}
To show latent learning, three groups of hungry rats have been considered:
\begin{descriptionlist}
\item[Group 1] No reward for solving the maze.
\item[Group 2] Reward for solving the maze.
\item[Group 3] Reward for solving the maze starting from day 11.
\end{descriptionlist}
It has been shown that rats of the third group complete the maze faster as soon as they receive food.
\begin{center}
\includegraphics[width=0.45\linewidth]{./img/tolman_experiment2.png}
\end{center}
\end{casestudy}
\subsection{Generation 1}
Shifted from studying the spatial domain to a more general domain.
Based on two types of actions:
\begin{descriptionlist}
\item[Goal-directed action] \marginnote{Goal-directed action}
Actions made because a desired outcome is expected.
An action is goal-directed if:
\begin{itemize}
\item There is knowledge of the relationship between action and consequences (response-outcome).
\item The outcome is motivationally relevant.
\end{itemize}
Goal-directed behavior has the following properties:
\begin{itemize}
\item Involves active deliberation.
\item Has a high computational cost.
\item It is flexible to changes of the environmental contingency (i.e. stops if no reward occurs)
\end{itemize}
\begin{center}
\includegraphics[width=0.65\linewidth]{./img/goal_directed_behavior.png}
\end{center}
\item[Habitual action] \marginnote{Habitual action}
Actions made automatically just because they were rewarded in the past.
They are not influenced by the current outcome even if it is undesired.
Habitual behavior has the following properties:
\begin{itemize}
\item Does not require active deliberation.
\item Has a low computational cost.
\item It is inflexible to changes of the environmental contingency.
\end{itemize}
\begin{center}
\includegraphics[width=0.65\linewidth]{./img/habitual_behavior.png}
\end{center}
\end{descriptionlist}
\begin{casestudy}[Goal-directed vs habitual behavior]
The experiment is done in three steps:
\begin{descriptionlist}
\item[Training]
The animal undergoes instrumental learning (e.g. associate that by pressing a lever some food will be dropped).
\item[Devaluation]
Manipulate the learned behavior by either:
\begin{itemize}
\item Devaluate the reinforcer.
\item Degradate the contingency.
\end{itemize}
\item[Testing]
Repeat the training scenario without reward:
\begin{itemize}
\item If the action associated with a devaluated reinforcer is performed less, the behavior is goal-directed.
\item If the frequency of the action is the same, the behavior is habitual.
\end{itemize}
\end{descriptionlist}
\indenttbox
\begin{remark}
The training phase aims to instill a goal-directed behavior.
On the other hand, if the animal is overtrained, it will learn a habitual behavior.
The experiment can be done both ways.
\end{remark}
\begin{center}
\includegraphics[width=0.85\linewidth]{./img/goal_directed_vs_habitual.png}
\end{center}
\end{casestudy}
It has been hypothesized that the striatum might be the interface where rewards influence actions as: \marginnote{Striatum}
\begin{itemize}
\item The basal ganglia are involved in the selection of actions.
\item The SNc affects the plasticity of the striatum through the release of dopamine.
\end{itemize}
Moreover, different sections of the striatum are responsible for different types of behavior:
\begin{descriptionlist}
\item[Dorsomedial striatum] Supports goal-directed behavior.
\item[Dorsolateral striatum] Supports habitual behavior.
\end{descriptionlist}
This also hints that goal-directed and habitual behaviors act simultaneously and competitively (see \hyperref[sec:instrumental_gen3]{Generation 3}).
\subsection{Generation 2}
Studied goal-directed and habitual behavior in humans.
\begin{description}
\item[Functional magnetic resonance imaging (fRMI)] \marginnote{Functional magnetic resonance imaging (fRMI)}
Measures the ratio of oxygenated to deoxygenated hemoglobin molecules in the brain.
It allows to indirectly measure the neuronal activity of the brain on a high spatial resolution (i.e. allows to see where things happen but not when).
\end{description}
\begin{casestudy}[Goal-directed behavior in humans]
Candidates are trained to select between two fractals of which
one leads to a reward with a high probability and the other with a low probability.
The possible rewards are chocolate, tomato juice and orange juice (used as a control outcome).
\begin{figure}[H]
\centering
\includegraphics[width=0.45\linewidth]{./img/human_goal_directed_experiment.png}
\caption{
Structure of the task. The high probability choice leads to the primary reward (chocolate or tomato juice) with probability $0.4$,
to the control reward (orange juice) with probability $0.3$ and to nothing with probability $0.3$.
The low probability choice leads to the control reward with probability $0.3$ and nothing in the other cases.
The neutral case leads to an empty glass or nothing.
}
\end{figure}
After training, one of the primary rewards is devalued through selective satiation and the other is labeled as the valued outcome.
Then, the training task is repeated.
\begin{figure}[H]
\centering
\includegraphics[width=0.55\linewidth]{./img/human_goal_directed_experiment2.png}
\caption{
Steps of the experiment. In this figure, the devalued reward is the tomato juice.
}
\end{figure}
Behavioral results show that:
\begin{itemize}
\item During training, candidates favored the high-probability actions associated with chocolate and tomato juice.
On the other hand, choices for the neutral condition were evenly distributed.
\item The pleasantness rating for the devalued reward lowered after devaluation while the valued reward remained higher.
\item During testing, candidates reduced their choice of the high-probability action associated with the devalued reward.
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{./img/human_goal_directed_experiment3.png}
\end{figure}
During both training and testing, the fRMIs of the candidates were taken.
Neural results show that the \textbf{medial orbitofrontal cortex }has a significant modulation in its activity during instrumental action selection
depending on the value of the associated outcome.
\begin{figure}[H]
\centering
\includegraphics[width=0.4\linewidth]{./img/human_goal_directed_experiment4.png}
\end{figure}
\end{casestudy}
\begin{casestudy}[Habitual behavior in humans]
Candidates are presented, at each round of the trial, with a fractal image and a schematic indicating which button to press.
The button can be pressed an arbitrary number of times and, at each press, on the screen appears:
\begin{itemize}
\item A gray circle (no reward).
\item The image of an M\&M's {\tiny ©} or Frito {\tiny ©} (reward) with probability $0.1$.
To each fractal, only a type of reward can appear.
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.6\linewidth]{./img/human_habitual_experiment.png}
\end{figure}
After training, one of the food rewards is devalued through selective satiation.
Then, during testing, the same training task with the same stimulus-response-outcome is repeated without a reward.
Two groups have been considered:
\begin{descriptionlist}
\item[1-day group] with little training.
\item[3-day group] with extensive training.
\end{descriptionlist}
Behavioral results show that:
\begin{itemize}
\item Before devaluation, there were no significant differences between the responses of the two groups independently of the type of food.
\item During testing, the 1-day group showed a goal-directed behavior while the 3-day group showed a habitual behavior.
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.55\linewidth]{./img/human_habitual_experiment2.png}
\end{figure}
During both training and testing, the fRMIs of the candidates were taken.
Neural results show that, in the 3-day group, the \textbf{dorsolateral striatum} had significant activity.
\end{casestudy}
\subsection{Generation 3} \label{sec:instrumental_gen3}
Formalized goal-directed and habitual actions:
\begin{descriptionlist}
\item[Model-based] (Goal-directed) \marginnote{Model-based}
Use a model to predict the consequences of actions in terms of future states and expected rewards from future states.
When the environment changes, the agent can update its policy of future states without the need to actually be in those states.
\item[Model-free] (Habitual) \marginnote{Model-free}
Select actions based on the stored state-action pairs learned over many trials.
When the environment changes, the agent has to move into the new states and experience them.
\item[Hybrid model] \marginnote{Hybrid model}
Integrated computational and neural architecture where
model-based and model-free systems act simultaneously and competitively.
This is the currently favored model for behavior.
\end{descriptionlist}
\begin{casestudy}[Latent learning in humans]
The experiment consists of a sequential two-choice Markov decision task in which candidates navigate a binary decision tree.
Each state contains a fractal image and
candidates can choose to move to the left or right branch, each of which will lead with probability $0.7/0.3$ to one of the two subsequent states.
When a leaf is reached, a monetary reward (0\textcentoldstyle, 10\textcentoldstyle\, or 25\textcentoldstyle) is delivered.
\begin{figure}[H]
\centering
\includegraphics[width=0.4\linewidth]{./img/human_latent_experiment.png}
\end{figure}
\begin{minipage}{0.58\linewidth}
The experiment is divided into two sessions:
\begin{descriptionlist}
\item[First session]
Candidates choices are fixed but they can learn the transition probabilities.
\item[Before second session]
Candidates are presented with the association between fractal and reward.
\item[Second session]
Candidates are free to choose their actions at each state.
\end{descriptionlist}
\end{minipage}
\begin{minipage}{0.4\linewidth}
\centering
\includegraphics[width=0.95\linewidth]{./img/human_latent_experiment2.png}
\end{minipage}\\[1em]
\begin{minipage}{0.6\linewidth}
Behavioral results show that the majority of the candidates are able to make the optimal choice.
This indicates that their behavior cannot be explained using a model-free learning theory (as learning only happens with a reward).
A hybrid model has been proposed to model the candidates' behavior. It includes:
\begin{descriptionlist}
\item[Reward prediction error] Associated to model-free learning.
\item[State prediction error] Associated to model-based learning.
\end{descriptionlist}
\end{minipage}
\begin{minipage}{0.4\linewidth}
\centering
\includegraphics[width=0.7\linewidth]{./img/human_latent_experiment3.png}
\end{minipage}\\[1em]
On a neuronal level, fRMIs show that:
\begin{itemize}
\item State prediction error activates the \textbf{intraparietal sulcus} and the \textbf{lateral prefrontal cortex}.
\item Reward prediction error activates the \textbf{ventral striatum}.
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.75\linewidth]{./img/human_latent_experiment4.png}
\end{figure}
\end{casestudy}
\begin{casestudy}[Model-free vs model-based in humans]
Consider a Markov decision task that works as follows:
\begin{itemize}
\item In the first stage, candidates have to choose between two fractal images,
each leading to one of the two subsequent states with probability $0.7$ (common) and $0.3$ (rare).
\item In the second stage, candidates have to choose between two fractal images,
each of which will lead to a monetary reward with a certain independent probability.
\item The probability of receiving the reward changes stochastically during the trials.
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.35\linewidth]{./img/model_free_based_theoretical.png}
\end{figure}
It is expected that:
\begin{descriptionlist}
\item[Model-free agents]
Ignore the transition structure and prefer to repeat actions that lead to a reward in the past.
\item[Model-based agents]
Respect the transition structure and modify their policies depending on the outcome.
They are more likely to repeat an action following a rewarding trial only if that transition is common.
\end{descriptionlist}
Despite that, the actual results on human candidates show that a hybrid model is more suited to explain human behavior.
\begin{figure}[H]
\centering
\includegraphics[width=0.6\linewidth]{./img/human_hybrid_model.png}
\end{figure}
% \begin{figure}[H]
% \centering
% \includegraphics[width=0.5\linewidth]{./img/model_free_based_theoretical2.png}
% \end{figure}
Neural results from fRMIs also show that the activity in the \textbf{striatum} increases for both model-based and model-free prediction errors.
\end{casestudy}
@@ -1,133 +0,0 @@
\chapter{Introduction}
\section{Definitions}
\begin{description}
\item[Neuroscience] \marginnote{Neuroscience}
Study of the nervous system (structure aspects) on various levels of detail:
\begin{descriptionlist}
\item[Molecular] Proteins and molecular signaling of the nervous system.
\item[Cellular] Morphological and physiological properties of neurons.
\item[Neural system] Creation and functioning of networks of neurons.
\end{descriptionlist}
\item[Cognition] \marginnote{Cognition}
Mental processes (function aspects) that react to inputs.
It involves processes regarding the acquisition, storage, manipulation, and retrieval of information.
\begin{descriptionlist}
\item[Perception] Information from the environment.
\item[Attention] Focus on a specific stimulus in the environment.
\item[Learning] Merging new information with prior knowledge.
\item[Memory] Encoding, storing, and retrieving information.
\item[Action] Interact with the environment using perceived information.
\item[Language] Understanding and producing spoken or written thoughts.
\item[Higher reasoning] Decision-making and problem-solving.
\end{descriptionlist}
\item[Biomimicry] \marginnote{Biomimicry}
Solving problems by taking inspiration from elements of nature.
As proof of general intelligence\footnote{\includegraphics[width=1cm]{img/doubt.png}},
the human brain is taken as the model for artificial intelligence.
Moreover, a successful brain-inspired AI application can
provide a possibly plausible explanation of the functioning of the brain.
However, a brain differs from a computer in many aspects:
\begin{itemize}
\item Hardware and software are distinct while mind and brain are not.
\item Machines learn by exploiting the capability of using a large memory
while brains have limited capacity but high generalization ability.
\item Brains produce both electrical and biochemical signals and
have feedforward, feedback, and recurrent connections
while machines typically only employ feedforward connections.
\end{itemize}
\begin{description}
\item[Structure emulation]
Mimic or reverse engineer the structure of the brain (e.g. Blue Brain Project).
\item[Function emulation]
Mimic a neural system on the algorithmic level (e.g. Deep Mind).
\end{description}
\item[Cognitive neuroscience] \marginnote{Cognitive neuroscience}
Study of the relationship between the physical brain and the intangible mind (thoughts, ideas).
In other words, it studies the relationship between structure and function.
\begin{casestudy}[Severed Corpus Callosum \href{https://www.youtube.com/watch?v=lfGwsAdS9Dc}{\texttt{video}}]
Normally, the right and left hemispheres of the brain can communicate.
Moreover, the left visual field is sent to the right hemisphere and
the right visual field is sent to the left hemisphere.
In patients where the hemispheres are split, a text shown on the right visual side is recognized as
the speech capabilities are located in the left hemisphere,
while a text shown on the left visual side does not trigger any speech reaction.
\end{casestudy}
\end{description}
\section{Neuroscience history}
Two main schools of thought emerged and are still the subject of ongoing debates:
\begin{descriptionlist}
\item[Localizationism] \marginnote{Localizationism}
Specific regions of the brain are responsible for particular faculties.
Assuming localizationism, 52 distinct regions with different neurons can be identified.
\item[Aggregate field theory] \marginnote{Aggregate field theory}
The brain works as a whole for mental functions.
\end{descriptionlist}
\subsection{Neuron doctrine}
\marginnote{Neuron doctrine}
The nervous system is made of a discrete amount of individual neurons (and not a continuous tissue).
\begin{description}
\item[Principle of dynamic polarization]
Electrical signals in a neuron flow only in a single direction.
\item[Principle of connectional specificity]
Neurons do not connect randomly but make specific connections at particular contact points.
\item[Synapse] \marginnote{Synapse}
Point of contact of two neurons. A synapse can be chemical or electrical.
\end{description}
\section{Cognitive science history}
\begin{description}
\item[Rationalism] \marginnote{Rationalism}
All knowledge can be derived through reasoning, without sensory experiences.
\item[Empiricism] \marginnote{Empiricism}
The brain starts as a blank slate and knowledge is added through sensory experiences.
\item[Associationism] \marginnote{Associationism}
Inspired by empiricism.
Learning happens by correlating individual experiences (e.g. actions followed by a reward will be repeated).
\item[Behaviorism] \marginnote{Behaviorism}
Inspired by empiricism.
Everyone has the same neural basis that is improved through learning.
Learning only involves observable behaviors.
\end{description}
\begin{remark}
Associationism and behaviorism are not able to explain all types of learning (e.g. language).
\end{remark}
\begin{description}
\item[Cognitivism] \marginnote{Cognitivism}
The psychological and biological levels of an individual cannot be separated.
Learning is based on the biology of the neurons.
\end{description}
@@ -1,777 +0,0 @@
\chapter{Nervous system anatomy and physiology}
\begin{description}
\item[Central nervous system] Brain and spinal cord.
\item[Peripheral nervous system] Nerves that branch off from the brain and the spine.
\end{description}
\section{Individual cells}
% A nervous system has two types of cells:
% \begin{descriptionlist}
% \item[Neurons/nerve cells]
% \item[Glia cells/neuroglia]
% \end{descriptionlist}
\subsection{Glia cells / Neuroglia}
\marginnote{Glia cells/Neuroglia}
Cells that support neurons.
There are 2 to 10 times more glia cells than neurons.\\
\begin{minipage}{0.89\textwidth}
\begin{descriptionlist}
\item[Microglia] \marginnote{Microglia}
Immune system cells located in the central nervous system.
They intervene in response to toxic agents or to clear dead cells.
\begin{itemize}
\item Responsible for antigen presentation (determine the type of external agent).
\item Become phagocytes (cells that ingest harmful agents) during injuries, infections, or degenerative diseases.
\end{itemize}
\begin{remark}
In patients affected by Alzheimer's disease, microglia may become hyperactive and damage neurons.
\end{remark}
\end{descriptionlist}
\end{minipage}
\begin{minipage}{0.1\textwidth}
\centering
\includegraphics[width=\textwidth]{./img/microglia.png}
\end{minipage}\\[1em]
\begin{minipage}{0.79\textwidth}
\begin{descriptionlist}
\item[Astrocytes] \marginnote{Astrocytes}
Star-shaped cells located in the central nervous system.
They surround neurons and are in contact with the brain's vasculature.
\begin{itemize}
\item Provide nourishment to neurons.
\item Regulate the concentration of ions and neurotransmitters in the extracellular space.
\item Communicate with the neurons to modulate synaptic signaling.
\item Maintain the blood-brain barrier that separates the tissues of the central nervous system and the blood.
\end{itemize}
\end{descriptionlist}
\end{minipage}
\begin{minipage}{0.2\textwidth}
\centering
\includegraphics[width=\textwidth]{./img/astrocyte.png}
\end{minipage}\\[1em]
\begin{minipage}{0.82\textwidth}
\begin{descriptionlist}
\item[Oligodendrocytes and Schwann cells] \marginnote{Oligodendrocytes\\Schwann cells}
Oligodendrocytes are located in the central nervous system, while
Schwann cells are located in the peripheral nervous system.
\begin{itemize}
\item Produce thin sheets of myelin that wrap concentrically around the axon of the neurons.
This insulating material allows the rapid conduction of electrical signals along the axon.
\end{itemize}
\begin{remark}
Myelin is white, giving the name to the white matter.
\end{remark}
\begin{remark}
In multiple sclerosis, the immune system attacks the oligodendrocytes,
slowing or disrupting messages traveling along the nerves.
\end{remark}
\end{descriptionlist}
\end{minipage}
\begin{minipage}{0.17\textwidth}
\centering
\includegraphics[width=\textwidth]{./img/insulation.png}
\end{minipage}
\subsection{Neurons / Nerve cells}
\marginnote{Neurons/Nerve cells}
A nervous system has around 100 billion neurons.
There are 100 distinct types of neurons varying in form, location, and interconnectivity.
Generally, a neuron does the following:
\begin{enumerate}
\item Receives some information.
\item Makes a decision.
\item Passes it to other neurons.
\end{enumerate}
\begin{description}
\item[Eukaryotic cell] \marginnote{Eukaryotic cell}
A neuron is an eukaryotic cell. Therefore, it has:
\begin{description}
\item[Cell membrane] Membrane that separates the intracellular and extracellular space.
\item[Cytoplasm] Intracellular fluid mainly made of proteins and ions of potassium, sodium, chloride, and calcium.
\item[Extracellular fluid] Fluid in which the neuron sits. Similar composition of the cytoplasm.
\item[Cell body/soma] Metabolic center of the cell.
\end{description}
\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{img/neuron_eukaryotic.png}
\caption{Neuron as an eukaryotic cell}
\end{figure}
\end{description}
\begin{description}
\item[Neuron-specific components] \phantom{}
\begin{description}
\item[Dendrites] \marginnote{Dendrites}
Receives the outputs of other neurons.
A neuron has multiple dendrites with different shapes depending on the type and location of the neuron.
\item[Axon] \marginnote{Axon}
Transmitting zone of the neuron that carries electrical signals from the dendrites to the synapses (from 0.1mm to 2m).
A neuron has a single axon.
\item[Synapses] \marginnote{Synapses}
Represents the output zone of the neuron from where electrical or chemical signals can be transmitted to other cells.
A neuron has multiple synapses.
\begin{description}
\item[Presynaptic cell] Cell transmitting a signal.
\item[Postsynaptic cell] Cell receiving a signal.
\item[Synaptic cleft] Narrow space separating presynaptic and postsynaptic cells (i.e. the space separating two neurons).
\end{description}
\end{description}
\end{description}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\textwidth]{img/neuron_specific.png}
\caption{Neuron-specific components}
\end{figure}
There are three types of synapses:
\begin{descriptionlist}
\item[Axosomatic] \marginnote{Axosomatic}
Synapses that a neuron makes onto the cell body (soma) of another neuron.
\item[Axodendritic] \marginnote{Axodendritic}
Synapses that a neuron makes onto the dendrites of another neuron.
\item[Axoaxonic] \marginnote{Axoaxonic}
Synapses that a neuron makes onto the synapses of another neuron.
In this case, the transmitting neuron can be seen as a signal modulator of the receiving neuron.
\begin{figure}[H]
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/axosomatic.png}
\caption{Axosomatic}
\end{subfigure}
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/axodendritic.png}
\caption{Axodendritic}
\end{subfigure}
\begin{subfigure}{.3\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/axoaxonic.png}
\caption{Axoaxonic}
\end{subfigure}
\end{figure}
\end{descriptionlist}
Neurons are divided into three functional categories:
\begin{descriptionlist}
\item[Sensory neurons] \marginnote{Sensory neurons}
Carry information from the body's peripheral sensors into the nervous system.
Provides both perception and motor coordination.
\item[Motor neurons] \marginnote{Motor neurons}
Carry commands from the brain or the spinal cord to muscles and glands.
\item[Interneurons] \marginnote{Interneurons}
Intermediate neurons between sensory and motor neurons.
\end{descriptionlist}
\begin{description}
\item[Principle of connectional specificity] \marginnote{Principle of connectional specificity}
Neurons do not connect randomly but rather make specific connections at particular contact points.
\end{description}
\section{Information transfer within a neuron}
\subsection{Neuron functional regions}
In a neuron, there are four regions that handle signals:
\begin{descriptionlist}
\item[Input zone] \marginnote{Input zone}
Dendrites collect information from different sources
in the form of \aclp{psp} (\acp{psp}).
\item[Integration/trigger zone] \marginnote{Integration/trigger zone}
\acp{psp} are summed at the axon hillock and an \ac{ap} is generated if a threshold (-55mV) has been exceeded.
\item[Conductive zone] \marginnote{Conductive zone}
The \ac{ap} is propagated through the axon.
\item[Output zone] \marginnote{Output zone}
Synapses transfer information to other cells.
\begin{description}
\item[Chemical synapses] The frequency of \acp{ap} determines the amount of neurotransmitters released.
\item[Electrical synapses] The \ac{ap} is directly transmitted to the next neurons.
\end{description}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{./img/neuron_transmission.png}
\caption{Transmitting regions of different types of neurons}
\end{figure}
\end{descriptionlist}
\subsection{Neuron transmission signals}
\begin{description}
\item[Resting membrane potential] \marginnote{Resting membrane potential}
In a resting neuron, the voltage inside the cell is more negative ($-70$mV) than the outside.
This allows the creation of an electrical signal when needed.
\item[\Acl{psp} (\ac{psp})] \marginnote{\Acl{psp} (\ac{psp})}
Small change in the membrane potential that alters the resting voltage of the cell.
A \ac{psp} can be:
\begin{descriptionlist}
\item[Excitatory \ac{psp} (\acs{epsp})] \marginnote{Excitatory \ac{psp}}
Has a depolarizing role: produces a decrease in the membrane potential (i.e. increases voltage inside the cell),
therefore enhancing the ability to generate an \ac{ap}.
\item[Inhibitory \ac{psp} (\acs{ipsp})] \marginnote{Inhibitory \ac{psp}}
Has a hyperpolarizing role: produces an increase in the membrane potential (i.e. reduces voltage inside the cell),
therefore reducing the ability to generate an \ac{ap}.
\end{descriptionlist}
A \ac{psp} has the following properties:
\begin{itemize}
\item The amplitude and duration of the signal are determined by the size of the stimulus that caused it.
Overall, the amplitude is small.
\item The signal is passively conducted through the cytoplasm, therefore it decays with distance and is able to travel 1mm at most.
\item A single \acs{epsp} is not enough to fire a neuron. Multiple \acp{psp} are summed at the axon hillock.
There are two types of summation:
\begin{descriptionlist}
\item[Spatial summation] Sum of the \acp{psp} received at the same time.
\item[Temporal summation] Sum of the \acp{psp} received at different time points.
\end{descriptionlist}
\begin{remark}
The fact that a single \ac{epsp} is not enough to fire a neuron prevents a response to every single stimulus.
\end{remark}
\end{itemize}
\item[\Acl{ap} (\ac{ap})] \marginnote{\Acl{ap} (\ac{ap})}
Signal generated when the sum of \acp{epsp} exceeds a fixed threshold of $-55$mV (all-or-none).
\begin{description}
\item[Saltatory conduction] \marginnote{Saltatory conduction}
Mechanism that allows a fast propagation on long distances of \acp{ap}.
\begin{enumerate}
\item Depolarization causes the sodium ion (Na+) channels located in the nodes of Ranvier of the axon to gradually open.
\item Na+ flows into the neuron and further depolarizes it until the Na+ equilibrium potential is reached.
\item With Na+ equilibrium, Na+ channels close and potassium ion (K+) channels open.
\item K+ flows into the neuron and restores the membrane potential until the K+ equilibrium potential is reached.
\item With K+ equilibrium, K+ channels close and
the membrane potential of the neuron is more negative than the resting potential (hyperpolarization).
It will gradually return to its resting potential.
\begin{remark}
During hyperpolarization, Na+ channels cannot open (refractory period).
This has two implications:
\begin{itemize}
\item It limits the number of times a neuron can fire in a given time.
\item Guarantees a unidirectional electrical current flow
(\textbf{Principle of dynamic polarization}).\marginnote{Principle of dynamic polarization}
\end{itemize}
\end{remark}
\end{enumerate}
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{./img/neuron_transmission2.png}
\caption{
\parbox[t]{0.6\linewidth}{
Signal from the input to the output zone. The amplitude of the stimulus modulates the frequency of \ac{ap}.
}
}
\end{figure}
\begin{figure}[H]
\begin{subfigure}{.45\textwidth}
\centering
\includegraphics[width=0.85\textwidth]{./img/saltatory_conduction.png}
\caption{Ion channels along the axon}
\end{subfigure}
\begin{subfigure}{.45\textwidth}
\centering
\includegraphics[width=0.8\textwidth]{./img/action_potential.png}
\caption{Triggering of an action potential}
\end{subfigure}
\end{figure}
\end{description}
\begin{remark}
As the signal is constantly regenerated,
\Acp{ap} have similar amplitude and duration in all neurons, regardless of the characteristics of the input \acp{psp}.
Therefore, the only way an \ac{ap} has to carry information is by varying frequency depending on the stimulus intensity, making it a binary signal.
\end{remark}
\end{description}
\begin{example}
Seizures are caused by misfiring neurons.
\end{example}
\section{Information transfer between two neurons}
\subsection{Electrical synapse}
\begin{minipage}{0.55\textwidth}
\begin{description}
\item[Structure] \marginnote{Electrical synapse}
The neuronal membranes of the presynaptic and postsynaptic neurons are in contact at \textbf{gap junctions} and
the cytoplasm of the two neurons is virtually continuous through connecting \textbf{pores}.
\end{description}
\end{minipage}
\begin{minipage}{0.35\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/electric_synapse.png}
\end{minipage}
\begin{description}
\item[Functioning]
The two neurons are \textbf{isopotential} (i.e. they have the same membrane potential) and
the ions of the presynaptic neurons are instantaneously transmitted to the postsynaptic neuron.
\item[Properties] \phantom{}
\begin{itemize}
\item Fast transmission.
\item Allows for synchronous operations involving groups of neurons.
\item The strength of the signal cannot be modulated.
\end{itemize}
\end{description}
\subsection{Chemical synapse}
\begin{description}
\item[Structure] \marginnote{Chemical synapse}
The synaptic cleft separates the presynaptic and postsynaptic neurons.
\begin{description}
\item[Neurotransmitter]
Chemical substance received by the receptors of the postsynaptic neuron.
The effect of a neurotransmitter is decided by the receiving receptor and not by the cell transmitting it.
\item[Presynaptic terminals]
Swellings at the end of the axon that contain synaptic vesicles.
\item[Synaptic vesicles]
Vesicles containing neurotransmitter molecules.
\end{description}
\item[Functioning]
The release of neurotransmitter molecules is based on the following steps:
\begin{enumerate}
\item An action potential arriving at the terminal of a presynaptic axon causes the calcium ion (Ca$^{2+}$) voltage-gates to open.
\item Ca$^{2+}$ flow into the cell and
cause the synaptic vesicles to bind to the cell membrane to release neurotransmitters into the synaptic cleft.
\item Neurotransmitters cross the synaptic cleft and bind to the receptors of the postsynaptic neuron.
Depending on the neurotransmitter and the receiving receptor, there might be a generation of \ac{epsp} or \ac{ipsp}.
\end{enumerate}
\begin{center}
\includegraphics[width=0.9\linewidth]{./img/chemical_synapse.png}
\end{center}
When a receptor recognizes the neurotransmitter, it is released back into the synaptic cleft.
To avoid a constant stimulation of the receptors, neurotransmitters are inactivated:
\begin{itemize}
\item The synaptic terminal can reuptake neurotransmitters through transporter proteins.
\item Neurotransmitters might degenerate or be broken down by special enzymes.
\item Neurotransmitters can be released far away from the site of the receptors.
\end{itemize}
\item[Properties] \phantom{}
\begin{itemize}
\item Slow transmission.
\item The signal can be modulated.
\item Has specific effects depending on the neurotransmitter and the receptors.
\end{itemize}
\end{description}
\section{Neural circuit}
\begin{description}
\item[Neural circuit] \marginnote{Neural circuit}
Group of interconnected neurons that process a specific kind of information.
\begin{remark}
The behavioral function of each neuron is determined by its connections.
\end{remark}
\item[Types of neurons] \phantom{}
\begin{description}
\item[Sensory neuron] \marginnote{Sensory neuron}
Carry information from the peripheral sensors to the nervous system for both perception and motor coordination.
\item[Motor neuron] \marginnote{Motor neuron}
Carry information from the nervous system to muscles and glands.
\item[Interneuron] \marginnote{Interneuron}
Intermediate neurons between sensory and motor neurons.
\end{description}
\end{description}
\begin{remark}
In vertebrates, a stimulus causes multiple neural pathways to simultaneously encode different information.
This allows for parallel processing to increase both the speed and reliability of the information transfer.
\end{remark}
\begin{description}
\item[Neural pathways types] \phantom{}
\begin{description}
\item[Divergent pathway] \marginnote{Divergent pathway}
One neuron activates many target cells.
Typically happens at the input stages of the nervous system
to ensure that a single neuron has a wide and diverse influence.
\item[Convergent pathway] \marginnote{Convergent pathway}
Many neurons activate a single target cell.
Typically happens at the output stages of the nervous system
to ensure that a motor neuron is activated only when a sufficient number of neurons are firing.
\end{description}
\item[Neuron firing types] \phantom{}
\begin{description}
\item[Excitatory neuron] \marginnote{Excitatory neuron}
Neurons that produce signals that increase the probability of firing of the postsynaptic neurons.
\item[Inhibitory neuron] \marginnote{Inhibitory neuron}
Neurons that produce signals that decrease the probability of firing of the postsynaptic neurons.
\begin{description}
\item[Feed-forward inhibition]
Excitatory neurons connected to inhibitory interneurons to block other downstream neurons.
Allows to enhance the active pathway and to block other antagonist actions.
\begin{figure}[H]
\centering
\includegraphics[width=0.4\textwidth]{./img/feedforward_inhibition.png}
\caption{Example of feed-forward inhibition}
\end{figure}
\item[Feed-back inhibition]
Excitatory neurons connected to inhibitory interneurons that return to the same neurons to inhibit them.
Prevents the overload of neurons or muscles.
\begin{figure}[H]
\centering
\includegraphics[width=0.4\textwidth]{./img/feedback_inhibition.png}
\caption{Example of feed-back inhibition}
\end{figure}
\end{description}
\end{description}
\end{description}
\begin{casestudy}[Knee-jerk reflex]
By tapping the patellar tendon (below the kneecap), the following happens:
\begin{enumerate}
\item The sensory information is conveyed from the muscle to the spinal cord (central nervous system).
\item The nervous system issues motor commands to the muscles which results in the knee jerk.
\item Inhibitory commands are issued to stop antagonist muscles.
\end{enumerate}
\begin{center}
\includegraphics[width=0.8\textwidth]{./img/knee_jerk.png}
\end{center}
\end{casestudy}
\section{Neural system}
\begin{figure}[H]
\centering
\includegraphics[width=0.3\textwidth]{./img/neural_system.png}
\caption{Composition of the nervous system}
\end{figure}
\subsection{\Acl{pns} (\acs{pns})}
The \acl{pns} is composed of:
\begin{descriptionlist}
\item[Nerves] \marginnote{Nerves}
Groups of axons and glia.
\item[Ganglia] \marginnote{Ganglia}
Groups of neuron bodies outside the \acl{cns}
\end{descriptionlist}
The \ac{pns} has the following functions:
\begin{itemize}
\item Delivers sensory information to the \acl{cns}.
\item Carries commands from the \acl{cns} to the muscles.
\item Supplies the \acl{cns} with information regarding both the external and internal environment.
\end{itemize}
The \ac{pns} has the following divisions:
\begin{descriptionlist}
\item[Somatic nervous system] \marginnote{Somatic nervous system} \phantom{}
\begin{itemize}
\item Sensory neurons that receive information from the skin, muscles, and joints.
\item Converts perceived spatial and physical information into electrical signals for the \acl{cns} to process.
\item Controls the voluntary muscles.
\end{itemize}
\item[Autonomic nervous system] \marginnote{Autonomic nervous system} \phantom{}
\begin{itemize}
\item Controls internal organs (viscera), the vascular system, and involuntary muscles and glands.
\item Divided into three systems:
\begin{descriptionlist}
\item[Sympathetic system] \marginnote{Sympathetic system}
Operates antagonistically against the parasympathetic system.
Handles the body's response to stress (using norepinephrine).
Physically, the sympathetic system originates from the spinal cord.
Its ganglia are closer to the spinal cord,
therefore the axons from the \acl{cns} to the ganglia are shorter than the axons from the ganglia to the organs.
\begin{example}
Stimulates adrenal glands to prepare the body for action (fight or flight),
increases heart rate,
diverts the blood from the digestive tract to the somatic musculature, \dots
\end{example}
\item[Parasympathetic system] \marginnote{Parasympathetic system}
Operates antagonistically against the sympathetic system.
Acts to preserve the body's resources and restore homeostasis (using acetylcholine).
Physically, the parasympathetic system originates from the base of the brain and from the sacral spinal cord.
Its ganglia are outside the spinal cord, sometimes inside the affected organs,
therefore the axons from the \acl{cns} to the ganglia are longer than the axons from the ganglia to the organs.
\begin{example}
Slows heart rate, stimulates digestion, \dots
\end{example}
\item[Enteric system] \marginnote{Enteric system}
Controls the involuntary muscles of the gut.
\end{descriptionlist}
\end{itemize}
\end{descriptionlist}
\subsection{\Acl{cns} (\acs{cns})}
\begin{description}
\item[Meninges] \marginnote{Meninges}
Three layers of membrane protecting the brain and the spinal cord.
\begin{descriptionlist}
\item[Dura mater] The outermost and thickest layer.
\item[Arachnoid mater] The middle layer.
\item[Pia mater] The innermost and most delicate layer. It adheres to the brain's surface.
\end{descriptionlist}
\item[Cerebrospinal fluid] \marginnote{Cerebrospinal fluid}
Fluid that allows the brain to float and prevents it from simply sitting on the skull surface.
It also reduces the shock to the brain and the spinal cord in case of rapid accelerations/decelerations.
The fluid is located in:
\begin{itemize}
\item The space between the arachnoid mater and the pia mater.
\item The brain ventricles.
\item Cisterns and sulcis.
\item The central canal of the spinal cord.
\end{itemize}
\item[Blood-brain barrier] \marginnote{Blood-brain barrier}
Barrier between the brain's capillaries and the brain's tissue.
It protects against pathogens and toxins.
\begin{remark}
The effectiveness of the barrier also prevents drugs to treat mental and neurological disorders from passing through.
\end{remark}
\item[Spinal cord] \marginnote{Spinal cord}
Acts as a relay for the information coming in and out of the brain.
It is enclosed in the vertebral column.
\end{description}
\begin{remark}
Most pathways in the \ac{cns} are bilaterally symmetrical:
the sensory and motor activities of one side of the body are handled by the cerebral hemisphere on the opposite side.
\end{remark}
\begin{description}
\item[Brain] \marginnote{Brain}
\begin{minipage}{0.6\textwidth}
\begin{description}
\item[Brain stem] \marginnote{Brain stem}
Regulates basic life functions such as blood pressure, respiration, and sleep/wakefulness.
It is divided into three sections:
\begin{itemize}
\item Medulla.
\item Pons.
\item Midbrain.
\end{itemize}
\end{description}
\end{minipage}
\begin{minipage}{0.35\textwidth}
\centering
\includegraphics[width=\linewidth]{./img/brain_sections.png}
\end{minipage}
\begin{description}
\item[Cerebellum] \marginnote{Cerebellum}
Contains lots of neurons and is responsible for:
\begin{itemize}
\item Maintaining posture.
\item Coordinating head, eye, and arm movement.
\item Regulating motor control (i.e. adjustments to the movement).
\item Learning motor skills.
\end{itemize}
\item[Diencephalon] \marginnote{Diencephalon}
\phantom{}\\
\begin{minipage}{0.6\linewidth}
\begin{description}
\item[Thalamus] \marginnote{Thalamus}
Sorts incoming sensory information (except the sense of smell) of the \acl{pns} and
sends them to the sensory regions of the cerebral hemispheres.
\item[Hypothalamus] \marginnote{Hypothalamus}
Regulates the autonomic nervous system and homeostasis through the pituitary gland (which releases hormones).
Handles the motivation system of the brain by favoring behaviors the organism finds rewarding.
\end{description}
\end{minipage}
\begin{minipage}{0.35\linewidth}
\centering
\includegraphics[width=\linewidth]{./img/diencephalon.png}
\end{minipage}
\item[Telencephalon/Cerebral hemispheres] \marginnote{Telencephalon/Cerebral hemispheres}
Consists of:
\begin{description}
\item[Cerebral cortex]
Made of gray matter (body of neurons).
\item[White matter]
(axons and glial cells).
\item[Basal ganglia] \marginnote{Basal ganglia}
Receive inputs from sensory and motor areas and
mostly send them through the thalamus to the frontal lobe.
They have a crucial role in motor control and reinforcement learning.
This happens through two pathways:
\begin{descriptionlist}
\item[Direct pathway] When active, it causes the disinhibition of the thalamus and has the consequence of initializing movement.
\item[Indirect pathway] When active, it causes the inhibition of the thalamus and consequently inhibits movement.
\end{descriptionlist}
To activate the direct pathway and inhibit the indirect pathway, the substantia nigra pars compacta (SNc) releases the neurotransmitter dopamine.
\begin{example}[Parkinson's disease]
In patients affected by Parkinson's disease, the dopamine-related neurons in the SNc are lost causing
an overactivation of the indirect pathway that inhibits movement.
\end{example}
\item[Amygdala] \marginnote{Amygdala}
Responsible for recognizing a stimulus and reacting to it.
Involved in attention, perception, value representation, decision-making, learning, memory, \dots
\item[Hippocampus] \marginnote{Hippocampus}
Responsible for long-term memory and spatial memory.
\end{description}
\item[Cerebral cortex] \marginnote{Cerebral cortex}
Surface of the brain which covers around 2.2m$^2$ to 2.4m$^2$.
To cover more surface, the cortex has infoldings (sulci and gyri) which also allow to connect neurons with shorter axons.
There are two symmetrical hemispheres connected through the corpus callosum and four different lobes.
\begin{figure}[H]
\centering
\begin{subfigure}{0.25\linewidth}
\centering
\includegraphics[width=\linewidth]{./img/brain_surface.png}
\caption{Visualization of sulci and gyri}
\end{subfigure}
\begin{subfigure}{0.35\linewidth}
\centering
\includegraphics[width=\linewidth]{./img/brain_lobes.png}
\caption{Lobes of the brain}
\end{subfigure}
\end{figure}
\begin{description}
\item[Frontal lobe] \marginnote{Frontal lobe}
\phantom{}
\begin{description}
\item[Motor cortex] \phantom{}
\begin{itemize}
\item Planning and execution of movement.
\item Contains neurons that directly activate somatic movement neurons in the spinal cord.
\end{itemize}
\item[Prefrontal cortex] \phantom{}
\begin{itemize}
\item Long-term planning.
\item Decision making.
\item Motivation and value.
\end{itemize}
\end{description}
\item[Parietal lobe] \marginnote{Parietal lobe}
Receives and integrates information from the outside world, the body, and memory.
\begin{description}
\item[Somatosensory cortex]
Receives information regarding touch, pain, temperature, and limb position.
\end{description}
\begin{remark}
Neurons responsible for a specific part of the body are clustered together.
\end{remark}
\item[Occipital lobe] \marginnote{Occipital lobe}
\begin{description}
\item[Visual cortex]
Responsible for vision.
Encodes features like luminance, spatial frequency, orientation, motion, \dots
\end{description}
\begin{remark}
Neurons responsible for processing a specific feature are clustered together.
\end{remark}
\item[Temporal lobe] \marginnote{Temporal lobe}
\begin{description}
\item[Auditory cortex]
Responsible for processing sound.
\end{description}
\begin{remark}
Neurons responsible for processing a specific sound frequency are clustered together.
\end{remark}
\item[Association cortex] \marginnote{Association cortex}
Portion of the cortex that has neither sensory nor motor responsibility.
Receives and integrates inputs from many cortical areas.
\begin{description}
\item[Multisensory neuron]
Cell activated by multiple sensory modalities.
\end{description}
\end{description}
\end{description}
\end{description}
@@ -1,496 +0,0 @@
\chapter{Pavlovian/classical learning}
Form of prediction learning that aims to learn stimulus-outcome associations:
\begin{itemize}
\item When a reinforcer is likely to occur.
\item Which stimuli tend to precede a reinforcer.
\end{itemize}
This allows the animal to emit a response in anticipation of a reinforcer.
Pavlovian learning works as follows:\\
\begin{minipage}{0.58\linewidth}
\begin{enumerate}[label=\alph*.]
\item A stimulus that has no meaning to the animal will result in \ac{nr}.
\item An \ac{us} (i.e. a reinforcer) generates an \ac{ur}.
\item Learning happens when a reinforcer is paired with a non-relevant stimulus.
\item The learned \ac{cs} generates a \ac{cr}.
\end{enumerate}
\end{minipage}
\begin{minipage}{0.4\linewidth}
\raggedleft
\includegraphics[width=0.9\linewidth]{./img/pavlovian_example.png}
\end{minipage}\\
An outcome can be:
\begin{descriptionlist}
\item[Appetitive] Something considered positive.
\item[Aversive] Something considered negative.
\end{descriptionlist}
The learned \acl{cr} can be:
\begin{descriptionlist}
\item[Behavioral] Associated to the startle response (i.e. reflex in response to a sudden stimulus).
\item[Physiological] Associated to the autonomic system.
\item[Change in subjective response]
\end{descriptionlist}
\begin{remark}
Pavlovian learning has its foundations in behaviorism: the brain starts as a blank slate and only observable behaviors can be studied.
\end{remark}
\section{Types of reinforcement}
There are two types of learning:
\begin{descriptionlist}
\item[Continuous reinforcement] \marginnote{Continuous reinforcement}
The \acl{cs} is reinforced every time the \acl{us} occurs.
\begin{remark}
More effective to teach a new association.
\end{remark}
\item[Partial reinforcement] \marginnote{Partial reinforcement}
The \acl{cs} is not always reinforced.
\begin{remark}
Learning is slower but the \acl{cr} is more resistant to extinction.
\end{remark}
\end{descriptionlist}
\section{Learning flexibility}
\begin{description}
\item[Acquisition] \marginnote{Acquisition}
The probability of occurrence of a \acl{cr} increases if the \acl{cs} is presented with the \acl{us}.
\item[Extinction] \marginnote{Extinction}
The probability of occurrence of a \acl{cr} decreases if the \acl{cs} is presented alone.
\end{description}
\begin{remark}
Extinction does not imply forgetting.
After an association between \ac{cs} and \ac{us} is made,
extinction consists of creating a second association with inhibitory effects that overrides the existing association.
The extinct association can return in the future
(this is more evident when the context is the same as the acquisition phase).
\begin{figure}[H]
\centering
\includegraphics[width=0.95\linewidth]{./img/pavlovian_extinction.png}
\caption{Example of acquisition, extinction, and \ac{cr} return}
\end{figure}
\end{remark}
\begin{description}
\item[Generalization] \marginnote{Generalization}
A new stimulus that is similar to a learned \acl{cs} can elicit a \acl{cr}.
\end{description}
\begin{casestudy}[Aplysia Californica] \phantom{}\\
\begin{minipage}{0.8\linewidth}
\begin{enumerate}
\item Before conditioning, a stimulus to the siphon of an aplysia californica results in a weak withdrawal of the gill.
\item During conditioning, a stimulus to the siphon is paired with a shock to the tail which results in a large withdrawal of the gill.
\item After conditioning, a stimulus to the siphon alone results in a large withdrawal response.
\end{enumerate}
\end{minipage}
\begin{minipage}{0.18\linewidth}
\centering
\includegraphics[width=\linewidth]{./img/aplysia.png}
\end{minipage}
\begin{figure}[H]
\centering
\includegraphics[width=0.85\linewidth]{./img/gill_pavlovian.png}
\caption{Conditioning process}
\end{figure}
\begin{minipage}{0.55\linewidth}
The learned response lasts for days.
It can be observed that without training, the response disappears faster.
\end{minipage}
\begin{minipage}{0.4\linewidth}
\begin{figure}[H]
\centering
\includegraphics[width=0.6\linewidth]{./img/gill_pavlovian_graph.png}
\caption{Withdrawal response decay}
\end{figure}
\end{minipage}
\end{casestudy}
\begin{remark} \marginnote{Amygdala in Pavlovian learning}
In mammals, aversive Pavlovian conditioning involves the amygdala.
The \ac{cs} and \ac{us} are relayed from the thalamus and the cerebral cortex to the amygdala,
which in turn connects to various motor responses such as:
\begin{descriptionlist}
\item[Central gray region (CG)] Controls the freezing behavior.
\item[Lateral hypothalamus (LH)] Controls autonomic responses.
\item[Paraventricular hypothalamus (PVN)] Controls stress hormones.
\end{descriptionlist}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{./img/amygdala_pavlovian.png}
\caption{Neural circuits during aversive conditioning}
\end{figure}
\end{remark}
\section{Memory}
\marginnote{Memory}
Memory is vulnerable to alteration.
Once reactivated, the subsequent reconsolidation phase might store a modified version of the memory.
\begin{figure}[H]
\centering
\includegraphics[width=0.6\linewidth]{./img/memory.png}
\caption{Memory flow}
\end{figure}
\begin{remark}
This mechanism is useful against traumatic memories.
\end{remark}
\begin{remark}
The amygdala is responsible for storing conditioned responses while the hippocampus recognizes conditioned stimuli.
Patients with a damaged amygdala only recognize \ac{cs} but do not act with any \ac{cr}.
On the other hand, a damaged hippocampus results in patients that present a \ac{cr} without recognizing the \ac{cs}.
\end{remark}
\begin{casestudy}[Reconsolidation disruption]
Propranolol is a drug that disrupts amygdala-specific memory reconsolidation (i.e. the physiological response).
A possible therapy to suppress a phobia is to trigger the fear memory and then administer propranolol to prevent its reconsolidation.
\end{casestudy}
\section{Learning preconditions}
\subsection{Contiguity}
\marginnote{Contiguity}
Closeness between the \acl{cs} and the \acl{us}.
\begin{remark}
The closer in time the stimuli are presented, the more likely the association will be created.
\end{remark}
Depending on when the \ac{cs} and \ac{us} are presented, conditioning can be:
\begin{descriptionlist}
\item[Delay conditioning] \marginnote{Delay conditioning}
The \ac{cs} is extended through the interstimulus interval (ISI) (i.e. time between the start of the \ac{cs} and the \ac{us}).
\item[Trace conditioning] \marginnote{Trace conditioning}
There is a delay (trace interval) between the \ac{cs} end and the \ac{us} start.
Learning requires more trials and might be impossible if the trace interval is too long as the mental representation of the \ac{cs} decays.
\begin{figure}[H]
\centering
\includegraphics[width=0.45\linewidth]{./img/contiguity.png}
\end{figure}
\end{descriptionlist}
\begin{casestudy}
Two groups of rats were exposed to a 6 seconds tone (\ac{cs}) followed by food delivery (\ac{us}) with a delay of:
\begin{itemize}
\item 6 seconds (red).
\item 18 seconds (purple).
\end{itemize}
\begin{figure}[H]
\centering
\includegraphics[width=0.55\linewidth]{./img/contiguity_rats.png}
\caption{Number of entries (i.e. the rat checks the food tray) per second}
\end{figure}
\end{casestudy}
\subsection{Contingency}
\marginnote{Contingency}
Causal relationship between the \acl{cs} and the \acl{us}.
\begin{remark}
Learning happens when:
\[ \prob{\text{\ac{us} with \ac{cs}}} > \prob{\text{\ac{us} with no \ac{cs}}} \]
In other words, the \ac{cs} should provide information regarding the \ac{us}.
\end{remark}
\begin{figure}[H]
\centering
\includegraphics[width=0.6\linewidth]{./img/contingency.png}
\caption{Example of contingent and random group}
\end{figure}
\begin{casestudy}
Two groups of rats are exposed to a shock paired with a bell ring.
Contiguity is the same but contingency differs.
Only the group where the shock with the bell is more likely learned the association.
\begin{figure}[H]
\centering
\includegraphics[width=0.8\linewidth]{./img/contingency_rats.png}
\caption{Representation of the experiment}
\end{figure}
\end{casestudy}
\subsection{Surprise}
\begin{description}
\item[Prediction error] \marginnote{Prediction error}
Quantitative discrepancy between the expected and experienced outcome.
\end{description}
\begin{remark}
Learning happens when the outcome is different from what was expected.
\end{remark}
\begin{figure}[H]
\centering
\includegraphics[width=0.4\linewidth]{./img/surprise.png}
\caption{Learning outcome due to surprise}
\end{figure}
\begin{casestudy}[Blocking effect]
\phantom{} \label{ex:blocking} \\
\begin{minipage}{0.65\linewidth}
\begin{enumerate}
\item A rat is taught that a hissing sound (\ac{cs}) is paired with a sexually receptive mate (\ac{us}).
\item A light is added together with the hissing sound.
\item When only the light is presented, the rat does not provide a response.
\end{enumerate}
The light is not learned as a \ac{cs} as it does not provide any new information on the \ac{us}.
\end{minipage}
\begin{minipage}{0.35\linewidth}
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{./img/surprise_rats.png}
\end{figure}
\end{minipage}
\end{casestudy}
\section{Computational model}
\subsection{Rescorla-Wagner model}
\marginnote{Rescorla-Wagner model}
Error-driven learning model where the change expectancy is proportional to the difference between predicted and actual outcome:
\[ \delta_{tr} = R_{tr} - V_{tr} \]
where:
\begin{itemize}
\item $\delta_{tr}$ is the prediction error.
\item $R_{tr} = \begin{cases}
1 & \text{if the \ac{us} is delivered at trial $tr$} \\
0 & \text{if the \ac{us} is omitted at trial $tr$}
\end{cases}$.
\item $V_{tr}$ is the association strength (i.e. expectancy of the \ac{us} or the expected value resulting from a given \ac{cs}) at trial $tr$.
\end{itemize}
Then, the expected value $V_{tr+1}$ is obtained as:
\[ V_{tr+1} = V_{tr} + \alpha \delta_{tr} \]
where $\alpha \in [0, 1]$ is the learning rate.
\begin{remark}
A lower $\alpha$ is more suited for volatile environments.
\end{remark}
\begin{remark}
The prediction error $\delta$ is:
\begin{itemize}
\item Positive during acquisition.
\item Negative during extinction.
\end{itemize}
Moreover, the error is larger at the start of acquisition/extinction.
\end{remark}
\begin{remark}
The Rescorla-Wagner model is able to capture the blocking effect (see \hyperref[ex:blocking]{Blocking example}) as
the animal computes a single prediction error obtained as the combination of multiple stimuli.
\end{remark}
\begin{figure}[H]
\centering
\includegraphics[width=0.4\linewidth]{./img/rescorla_wagner_curve.png}
\caption{Acquisition and extinction in Pavlovian learning according to the Rescorla-Wagner model}
\end{figure}
\begin{remark}
The Rescorla-Wagner model is a trial-level model that only considers the change from trial to trial
without considering what happens within and between trials.
\end{remark}
\subsection{Temporal difference model}
\marginnote{Temporal difference model}
Real-time model based on time steps within a trial instead of monolithic trials.
At each time $t$ of a trial during which a \ac{cs} is presented,
the model computes a prediction of the total future reward that will be gained from time $t$ to the end of the trial.
The prediction error is computed as follows:
\begin{gather*}
\delta_t = R_t + V_t - V_{t-1} \\
V_{t+1} = V_t + \alpha \delta_t
\end{gather*}
\begin{itemize}
\item At the beginning of learning, the \ac{cs} is presented at time $t_\text{\ac{cs}}$
and $V_t = 0$ until the \ac{us} is delivered at time $t_\text{\ac{us}} > t_\text{\ac{cs}}$.
\item On the next trial, $V_{t_\text{\ac{us}}} - V_{t_\text{\ac{us}} - 1}$ now generates a positive prediction error that updates $V_{t_\text{\ac{us}} - 1}$.
\item On subsequent trials, $V_t$ is updated for each $t$ in between $t_\text{\ac{us}}$ back to $t_\text{\ac{cs}}$.
\end{itemize}
In other words, the value signal produced by the reward (\ac{us}) is transferred back to an event (\ac{cs}) that predicts the reward.
\begin{casestudy}[Second-order conditioning]
Pairing a new \ac{cs} to an existing \ac{cs}.
\begin{center}
\includegraphics[width=0.95\linewidth]{./img/second_order_conditioning.png}
\end{center}
\indenttbox
\begin{remark}
The Rescorla-Wagner model is not capable of modeling second-order conditioning while
the temporal difference model is.
\end{remark}
\end{casestudy}
\section{Reward prediction error hypothesis of dopamine}
There is strong evidence that the dopaminergic system is the major neural mechanism of reward and reinforcement.
\begin{description}
\item[Response to unexpected rewards] \marginnote{Dopamine response to unexpected rewards}
Dopaminergic neurons exhibit a strong phasic response in the presence of an unexpected reward.
\begin{casestudy}[Monkey that touches food]
Some food is put in a box with a hole to reach its content.
In the absence of any other stimuli predicting the reward,
a monkey presents a high dopaminergic response when it touches the food.
\begin{center}
\includegraphics[width=0.55\linewidth]{./img/dopamine_monkey1.png}
\end{center}
\end{casestudy}
\item[Reward discrimination] \marginnote{Dopamine reward discrimination}
Dopamine neurons respond differently depending on the actual presence of a reward.
\begin{casestudy}[Monkey that touches food]
The dopaminergic response of a monkey that touches an apple attached to a wire in a box is different
from the response of touching the wire only.
\begin{center}
\includegraphics[width=0.5\linewidth]{./img/dopamine_monkey2.png}
\end{center}
\end{casestudy}
\item[Magnitude discrimination] \marginnote{Dopamine magnitude discrimination}
Dopamine neurons respond differently depending on the amount of reward received.
\begin{casestudy}[Monkey that drinks]
By giving a monkey different amounts of fruit juice in a pseudorandom order,
its dopaminergic response is stronger for the highest volume and weaker for the lowest volume.
\begin{center}
\includegraphics[width=0.7\linewidth]{./img/dopamine_monkey3.png}
\end{center}
\end{casestudy}
\begin{casestudy}[Monkey with juice and images]
Using different \acp{cs}, it can be seen that the dopaminergic response differs based on the amount of reward.
\begin{center}
\includegraphics[width=0.55\linewidth]{./img/dopamine_expected.png}
\end{center}
\end{casestudy}
\begin{casestudy}[Monkey with juice and images]
After learning the association between a \ac{cs} and \ac{us} (middle graph), a change in the amount of the reward changes the dopaminergic response.
\begin{center}
\includegraphics[width=0.6\linewidth]{./img/dopamine_expected2.png}
\end{center}
This behavior also involves the context (i.e. the \ac{cs} image that is shown).
\begin{center}
\includegraphics[width=0.6\linewidth]{./img/dopamine_expected3.png}
\end{center}
\end{casestudy}
\end{description}
\begin{remark}
With the previous observations, it can be concluded that:
\begin{itemize}
\item Dopamine neurons increase their firing rate when the reward is unexpectedly delivered or better than expected.
\item Dopamine neurons decrease their firing rate when the reward is unexpectedly omitted or worse than expected.
\end{itemize}
\end{remark}
\begin{description}
\item[Transfer to \ac{cs}] \marginnote{Dopamine transfer to \ac{cs}}
\begin{itemize}
\item Before training, an unexpected reward (\ac{us}) causes the dopamine neurons to increase firing (positive prediction error).
\item After training, dopamine neurons firing is increased after the \ac{cs} but not following the reward (no prediction error).
\item After training, dopamine neurons firing is increased after the \ac{cs} but is decreased if the reward is omitted (negative prediction error).
\end{itemize}
\begin{casestudy}
\phantom{}
\begin{center}
\includegraphics[width=0.38\linewidth]{./img/dopamine_transfer_cs.png}
\end{center}
\end{casestudy}
\item[Response to blocking] \marginnote{Dopamine response to blocking}
Dopaminergic response is in line with the blocking effect.
\begin{casestudy}[Monkey with food and images]
\phantom{}\\
\begin{minipage}{0.7\linewidth}
A monkey is taught to associate images with food.
A new \ac{cs} alongside an existing \ac{cs} will not be learned.
\end{minipage}
\begin{minipage}{0.28\linewidth}
\centering
\includegraphics[width=0.8\linewidth]{./img/dopamine_blocking.png}
\end{minipage}
\end{casestudy}
\item[Probability encoding] \marginnote{Dopamine probability encoding}
The phasic activation of dopamine neurons varies monotonically with the reward probability.
\begin{casestudy}
\phantom{}
\begin{center}
\includegraphics[width=0.65\linewidth]{./img/dopamine_probability.png}
\end{center}
\end{casestudy}
\item[Timing encoding] \marginnote{Dopamine timing encoding}
Dopamine response to unexpectedness also involves timing.
A dopaminergic response occurs when a reward is given earlier or later than expected.
\begin{casestudy}
After learning that a reward occurs 1 second after the end of the \ac{cs},
dopamine neurons fire if the timing changes.
\begin{center}
\includegraphics[width=0.5\linewidth]{./img/dopamine_timing.png}
\end{center}
\end{casestudy}
\end{description}
\begin{remark}
Dopamine is therefore a signal for the predicted error and not strictly for the reward.
\end{remark}

Some files were not shown because too many files have changed in this diff Show More