Posts

optimization

Last edited: August 8, 2025

optimization is a decision making method:

  1. identify a performance measure and a space of possible strategies to try
  2. run a bunch of simulations given a particular strategy, and measuring the performance
  3. try strategies with the goal of maximizing the performance measured

Importantly: model is not used to guide the search, it is only used to run simulations to evaluate performance.

Disadvantage (or advantage)

does not take a advantage of the structure of the problem

Optimization Index

Last edited: August 8, 2025

AA222/CS361

Applications

Example Objectives

  • efficiency
  • safety
  • accuracy

Example Constraints

  • cost
  • weight
  • (structural) integrity

Why this is hard?

  • high dimensional search spaces
  • multiple competing objectives
  • model uncertainty

Queen Dido’s Problem

  • you are granted a plot of land
  • how do we surround it with the smallest amount of string?

Design Workflow

“Optimization: how do we ‘change design’ in response to evaluation”

Logistics

aa222.stanford.edu

Overview

Lectures

Derivatives, Bracketing, Descent, and Approximations

Topics: Derivatives, Bracking, Descent, and Approximation

Optimizing Spark

Last edited: August 8, 2025

In the event your domain knowledge can help you make decisions about how spark load-balances or stripes data across worker nodes.

Persistence

“you should store this data in faster/slower memory”

MEMORY_ONLY, MEMORY_ONLY_SER, MEMORY_AND_DISK, MEMORY_AND_DISK_SER, DISK_ONLY

rdd.persist(StorageLevel.MEMORY_AND_DISK)
# ... do work ...
rdd.unpersist()

Parallel Programming

option

Last edited: August 8, 2025

options are derivatives which gives you the permission to make a transaction at a particular date.

There are two main types of options:

  • call: gives permission to buy a security on or before the “exercise” date
  • puts: gives permission to sell a security on or before the “exercise” date

For this article, we will define \(S_{t}\) to be the stock price at the time \(t\), \(K\) as the option’s strike price, \(C_{t}\) to be the price of the “call” option, and \(P_{t}\) to be the price of the “put” option at strike price \(K\); lastly \(T\) we define as the maturity date.

Option (MDP)

Last edited: August 8, 2025

an Option (MDP) represents a high level collection of actions. Big Picture: abstract away your big policy into \(n\) small policies, and value-iterate over expected values of the big policies.

Markov Option

A Markov Option is given by a triple \((I, \pi, \beta)\)

  • \(I \subset S\), the states from which the option maybe started
  • \(S \times A\), the MDP during that option
  • \(\beta(s)\), the probability of the option terminating at state \(s\)

one-step options

You can develop one-shot options, which terminates immediate after one action with underlying probability