text:
Color Theory/Color for programmers

How to use color in your program
workflow in computer graphic

Steps:
 * check your data ( type, range)
 * check color profiles of your graphic devices
 * Device calibration
 * choose what feature of the data you want to highlight
 * apply gradient
 * check the result/ optimize it

theory

 * khan academy: pixar color

colour management
In digital imaging systems, color management (or colour management) is the controlled conversion between the color representations of various devices, such as image scanners, digital cameras, monitors, TV screens, film printers, computer printers, offset presses, and corresponding media.

The primary goal of color management is to obtain a good match across color devices; for example, the colors of one frame of a video should appear the same on a computer LCD monitor, on a plasma TV screen, and as a printed poster. Color management helps to achieve the same appearance on all of these devices, provided the devices are capable of delivering the needed color intensities. With photography, it is often crucial that prints or online galleries appear how they were intended. Color management cannot guarantee identical color reproduction, as this is rarely possible, but it can at least give more control over any changes which may occur

Steps
 * profile of each graphic device (scanner, digital camera, monitor and printer) and operating system

rendering intent
 * perceptual rendering: images will be reproduced on prints or displays
 * colorimetric intent: images will be simulating one device on another such as a print on a display ( proofing)
 * saturation intent: business graphics with maximum colourfulness on the print

color fidelity refers to the successful interoperability of color data, from image creation to output across multiple targets, such that color reproduction quality consistent with the user’s intent can be achieved

First
 * color management system ( CMS) as a part of operating system
 * Linux_color_management, ubuntu color menagment
 * little CMS

color bit depth
Bit depth is the number of bits per pixel, sample, or texel in a bitmap image (holding one or mode image channels, typical values being 4, 8, 16, 24, 32 When referring to a color component, the concept can be defined as:
 * bits per component ( bpc)
 * bits per channel (bpc)
 * bits per color (bpc)
 * bits per pixel component (bpp)
 * bits per color channel (bpc)
 * bits per sample (bps)

Modern standards tend to use bits per component, but historical lower-depth systems used bits per pixel more often.

Color bit depth
 * 8 bit color = 1 byte
 * gray images
 * color images with palette = 8-bit RGB (VGA colors)
 * RGB565 ( 16 bit color = 2 bytes) High color. Here red and blue are encoded in 5 bits and green in 6 bits.
 * RGB888 ( 24 bit color = 3 bytes ) true color
 * RGBA ( 32 bit color = 4 bytes)

Color depth by image file types
 * for png color depth can range from 1 to 64 bits per pixel

number type, range and precision

 * integer
 * decimal
 * hexadecimal
 * real numbers

Examples by RapidTables:
 * White RGB code = (255,255,255) = 255*65536+255*256+255 = #FFFFFF
 * Blue RGB code = (0,0,255) = 0*65536+0*256+255 = #0000FF

Precision in GIMP:
 * Integer Precision Options
 * 8-bit integer
 * 16-bit integer
 * 32-bit integer
 * Floating point precision options
 * 16-bit floating point
 * 32-bit floating point

color profile

 * icc specification

ICC:
 * a 3x3 matrix
 * a one-dimensional tone curve for each colour channel
 * a thre-dimensional look-up table (LUT)
 * a second 1D tone curve for each channel

iccmax
 * DemoIccMAX = Demonstration Implementation for iccMAX color profiles

color space

 * color space
 * discrete samples from color space
 * CMS = Color Matching System = industry standards in the classification of spot color systems
 * manufactures and their color charts

List
 * CMY
 * CMYK
 * HSL
 * HSLuv = is a human-friendly alternative to HSL
 * HSB
 * HSV
 * LAB
 * LCH(uv)
 * LCH(OK)
 * LUV
 * RGB
 * XYZ
 * YXY

Types
 * intermediate color space such as L*A*B*, more accurately preserving color. Color conversions from one device to another may also use Lab as an intermediate step
 * Profile connection space (PCS) such as CIELAB or CIEXYZ
 * Working Color Space such as sRGB, Adobe RGB or ProPhoto are color spaces that facilitate good results while editing. For instance, pixels with equal values of R,G,B should appear neutral. Using a large (gamut) working space will lead to posterization, while using a small working space will lead to clipping.
 * linear color space, which corresponds more closely to nature, and makes computations more physically accurate
 * display color space ( monitor, projector, TV, web)
 * Image Color Spaces
 * PNG or JPEG files will typically store colors in a color space ready for display, not in a linear space. When they are used as textures in renders, they need to be converted to linear first, and when saving renders for display on the web, they also need to be converted to a display space.
 * for intermediate files in production, it is recommended to use OpenEXR files. These are always stored in scene linear color spaces, without any data loss. That makes them suitable to store renders that can later be composited, color graded and converted to different output formats.
 * Uniform color spaces (UCSs) are built such that the same geometrical distance anywhere in the color space reflects the same amount of perceived color difference. There have been many attempts at building such a color space. As human vision has three components, the space is necessarily 3D; it is generally assigned such that one is the lightness and the other two the chroma. A uniform color space is useful for a wide range of tasks. It can be used to calculate color difference or to pick colors in a visually harmonious way, for example. Examples: CIELAB, Nayatani et al. model, Hunt model, RLAB, LLAB, CIECAM97s, IPT, ICtCp, CIECAM02, iCAM06, CAM16, OKLab
 * CSS predefined color spaces: CSS provides several predefined color spaces including:
 * display-p3, which is a wide gamut space typical of current wide-gamut monitors
 * prophoto-rgb, widely used by photographers
 * rec2020, which is a broadcast industry standard, ultra-wide gamut space capable of representing almost all visible real-world colors

A leaf colour measured with a spectrophotometer has the color
 * rgb(41.587%, 50.3670%, 36.664%)
 * lch(51.2345% 21.2 130)
 * lab(51.2345% -13.6271 16.2401)
 * sRGB ( 0.41587, 0.503670 , 0.36664)
 * display-p3 ( 0.43313, 0.50108, 0.37950 )
 * a98-rgb (0.44091, 0.49971, 0.37408)
 * prophoto-rgb ( 0.36589, 0.41717, 0.31333 )
 * rec2020( 0.42210, 0.47580, 0.35605 )

properties of a color space
 * perceptual uniformity: the same numerical change in coordinates produces the same perceptual color difference

Types by perceptual uniformity
 * perceptually uniform = the same numerical change in coordinates produces the same perceptual color difference
 * LCH (and Lab)
 * OKLab
 * HSLuv
 * CIELUV, a color space designed for perceptual uniformity based on human experiments.
 * roughly perceptually uniform: sRGB ( after applying a gamma )

types by precision
 * 8-bit sRGB color space
 * 10-bit
 * 32-bit linear color space

Why do we need perceptually uniform color spaces?

 * Perceptually uniform color spaces allow us to align numbers in our code with the visual effect perceived in our viewers

CIE XYZ
CIE XYZ. It was designed in such a way that its Y component represented the brightness of the color.

RGB
Types
 * RGB (linear, non-corrected )
 * The gamma-corrected color spaces = non-linear
 * sRGB: ( non-linear, a standard default color space for the Internet )
 * sRGB Linear space is the same as sRGB except that the transfer function is linear-light (there is no gamma-encoding)
 * Adobe RGB
 * DCI P3
 * Display P3 ( wide color gamut)

The relationship between sRGB and linear RGB:
 * is that you get an sRGB pixel by raising each component of a linear pixel to the power of 1/2.2. By applying a gamma, sRGB is roughly perceptually uniform.
 * The RGB=>sRGB transformation is approximately: $$V_{sRGB} = V_{RGB}^{1/2.2}$$

HCV

 * HSV space are not perceived as really equidistant.

HCL

 * HCL is in fact just a cylindrical transformation of CIE Lab*.

HSL and HSV

 * HSL (for hue, saturation, lightness) and HSV (for hue, saturation, value; also known as HSB, for hue, saturation, brightness) are alternative representations of the RGB color model.
 * HSLuv = Human-friendly HSL

CIE LUV

 * the CIE 1976 L*, u*, v* color space, commonly known by its abbreviation CIELUV, is a color space adopted by the International Commission on Illumination (CIE) in 1976, as a simple-to-compute transformation of the 1931 CIE XYZ color space, but which attempted perceptual uniformity

LAB

 * CIELAB = CIE L*AB
 * OKLAB = A perceptual color space for image processing. The default color space for mixing (and gradients) in CSS is oklab
 * Hunter LAB

Tools
 * Olivier Vicario: Perceptual-ColorPicker for Processing3

OKLAB
 * The default color space for mixing (and gradients) in CSS is oklab

A color in Oklab is represented with three coordinates Lab:
 * L – perceived lightness ( a unitless number in the range [0,1] )
 * a – is a numerical value between green (negative values) and red (positive values)
 * b – is a numerical value between blue (negative values) and yellow (positive values)

It's corresponding polar form is called Oklch.

The standard coordinate can also be transformed into polar form ( Lch), with the coordinates:
 * L = lightness
 * c = chroma
 * h = hue

 * $$C = \sqrt{a^2 + b^2}$$

 * $$h^{\circ}=\text{atan2}(b,a)$$

In reverse direction:

 * $$a=C\cos(h^{\circ})$$

 * $$b=C\sin(h^{\circ})$$

See also
 * Converting from linear sRGB to Oklab

CIELAB color space is
 * a device-independent
 * "standard observer" model
 * is not truly perceptually uniform

color classification

 * Web-safe_colors in wikipedia
 * Device-independent Colors: CIE Lab and LCH, Oklab and Oklch
 * A CSS color is
 * valid or invalid
 * in or out of gamut: A color may be a valid color but still be outside the range of colors that can be produced by an output device (a screen, projector, or printer) or the range of colors that may be represented by a given color model (for example HSL or HWB)
 * False color in wikipedia
 * Color_coding_in_data_visualization in wikipedia
 * spectral colors: A rainbow is a decomposition of white light into all of the spectral colors.
 * extra-spectral colors
 * Grayscale (achromatic) colors, such as white, gray, and black. Any color that lacks strong chromatic content is said to be unsaturated, achromatic, or near neutral. Pure achromatic colors include black, white, all grays and beiges; near neutrals include browns, tans, pastels, and darker colors. Near neutrals can be of any hue or lightness.

Neutrals are obtained by mixing pure colors with white, black or gray, or by mixing two complementary colors. In color theory, neutral colors are colors easily modified by adjacent more saturated colors and they appear to take on the hue complementary to the saturated color. Next to a bright red couch, a gray wall will appear distinctly greenish.

Black and white have long been known to combine well with almost any other colors; black decreases the apparent saturation or brightness of colors paired with it, and white shows off all hues to equal effect
 * Any color obtained by mixing a gray-scale color and another color (either spectral or not), such as pink (a mixture of a reddish color and white), or brown (a mixture of orange and black or gray).
 * Violet-red colors, which in color theory include line of purples colors (such as, approximately, magenta and rose), and other variations of purple and red.
 * Impossible colors, which cannot be seen under normal viewing of light, such as over-saturated colors or colors that are seemingly brighter than white.
 * Metallic colors which reflect light by effect.

Each valid color is either in-gamut for a particular output device (screen, or printer) or color space, or it is out of gamut.

CMS
Spot color classification has led to thousands of discrete colors being given unique names or numbers. There are several industry standards in the classification of spot color systems, such as: Because each color system creates their own colors from scratch, spot colors from one system may be impossible to find within the library of another.
 * PANTONE, the dominant spot color printing system in the United States and Europe.
 * Toyo, a common spot color system in Japan.
 * DIC Color System Guide, another spot color system common in Japan – it is based on Munsell color theory.
 * ANPA, a palette of 300 colors specified by the American Newspaper Publishers Association for spot color usage in newspapers.
 * GCMI, a standard for color used in package printing developed by the Glass Packaging Institute (formerly known as the Glass Container Manufacturers Institute, hence the abbreviation).
 * HKS is a color system which contains 120 spot colors and 3,250 tones for coated and uncoated paper. HKS is an abbreviation of three German color manufacturers: Hostmann-Steinberg Druckfarben, Kast + Ehinger Druckfarben and H. Schmincke & Co.
 * RAL is a color matching system used in Europe. The so-called RAL CLASSIC system is mainly used for varnish and powder coating.
 * AS2700 = Australian Standard colours (AS 2700)

Color volume

Color volume is the set of all available color at all available hue, saturation and brightness. It's the result of a 2D color space or 2D color gamut (that represent chromaticity) combined with the dynamic range.

The term has been used to describe HDR's higher color volume than SDR (i.e. peak brightness of at least 1,000 cd/m2 higher than SDR's 100 cd/m2 limit and wider color gamut than w:Rec. 709 / w:sRGB).

Color volume
 * SDR Color Volume = 200 cd/m2
 * HLG Color Volume = 1 000 cd/m2
 * PQ Color Volume = 10 000 cd/m2

color gamut
In color reproduction, including computer graphics and photography, the gamut, or color gamut, is a certain complete subset of colors. The most common usage refers to the subset of colors which can be accurately represented in a given circumstance, such as within a given color space or by a certain output device, like monitor.

the difference between the RGB and CMYK color gamuts: the CMYK color gamut is much smaller than the RGB color gamut, thus the CMYK colors look muted.

If you were to print the image on a CMYK device (an offset press or maybe even an inkjet printer) the two sides would likely look much more similar, since the combination of cyan, yellow, magenta, and black cannot reproduce the range (gamut) of color that a computer monitor displays. This is a constant issue for those who work in print production. Clients produce bright and colorful images on their computers and are disappointed to see them look muted in print. (An exception is photo processing. In photo processing, like snapshots or 8x10 glossies, most of the RGB gamut is reproduced.)

The gamuts of different color spaces may be compared by looking at the volume (in cubic Lab units) of colors that can be expressed. The following table examines the predefined color spaces available in CSS.

Display:
 * a narrow-gamut display ( sRGB gamut)
 * a wide-gamut display ( more then sRGB)
 * gamut of Display P3 colorspace: Display-P3 color space includes vivid colors that aren’t available in sRGB.
 * gamut of Rec.2020 colorspace ( rare)
 * gamut of the lab lch colorspaces

color space	Volume in million Lab units
 * sRGB = 0.820
 * display-p3 = 1.233
 * a98-rgb	1.310
 * prophoto-rgb	2.896
 * rec2020	2.042

Links
 * khan academy : pixar, color-space

Color operators
Simple rolor operators, an analytical color operators that can be parameterized on a single input variable f(x)
 * brightness
 * gamma
 * contrast
 * color balance

dynamic range
Dynamic range

Gamma correction

 * gamma-correct downscale
 * fractalforums.org : gamma-correction-and-location-of-zoom-image
 * The transfer function, also known as the tone response curve (TRC) or gamma function

Gamma value
 * real world = 1.0
 * floating point images ( HDRI) = 1.0
 * integer ( SDRI with sRGB) images = 2.2

Transfer function
Transfer function T in imaging
 * function relating image luminance with image samples

$$T : scalarvalue \to colorvalue$$

Examples:
 * gray(x) returns a shade of gray. The argument x should be in the range 0–1. If x=0, black is returned; if x=1, white is returned.
 * rgb(r,g,b) returns a color with the specified RGB components, which should be in the range 0–1.
 * cmyk(c,m,y,k) returns a color with the specified CMYK components, which should be in the range 0–1.
 * hsb(h,s,b) returns a color with the specified coordinates in hue–saturation–brightness color space, which should be in the range 0–1.
 * hsl(h,s,l)

Normalisation = resecale to standard range

$$scalarvalue \xrightarrow{normalize} [0,1] \xrightarrow{transfer function} colorvalue$$

Types:
 * separated transfer functions for color and opacity in ParaView
 * Multi-Dimensional Transfer Functions
 * "The Transfer Function technique is a volume ray casting and rendering technique that assigns a different color and a different opacity/transparency value in different ranges of intensity values. This is done with a histogram based function, the "transfer function". The transfer function consists several control points, and each one of them corresponds to an intensity value and it has an RGB color and an opacity/transparency value. The intensity value of a control point is displayed with its color and opacity/transparency value, and the intensity values between two control points are displayed with the interpolated colors and the interpolated opacity/transparency values of the two control points. With the use of the transfer function, the different parts of the human body are displayed with a different color and a different opacity/transparency value." from Sante DICOM Viewer 3D Pro
 * HDR Transfer_function

Tone mapping
$$HDR \xrightarrow{tone\ mapping} LDR$$
 * "The process of compressing a single frame of HDR data (real or synthetic) into a range displayable by monitors is called tone mapping."
 * "Tone mapping is the process of transforming floating point color values to the expected [0.0, 1.0] range known as low dynamic range without losing too much detail, often accompanied with a specific stylistic color balance."
 * tonemapper = A tool for exploring and applying various tonemapping operators by Tizian Zeltner
 * Tonemap operators Created by romainguy
 * snibgo's ImageMagick pages: HDRI transfer functions
 * "there's a lot of different ways to do it although some methods work better than others depending on what and how you are rendering." FractalLandscaper
 * "if you're rendering something that utilizes random sampling (eg. Buddhabrot) then median stacking several images with different seeds and/or slightly different sampling offsets can be used to produce smoother final images." FractalLandscaper

Types with respect to range:
 * global
 * local

Transfer functions types with respect to function type:
 * linear functions for raw image formats, Note that some OETF and EOTF have an initial linear portion followed by a non-linear part (e.g. sRGB and Rec.70 )
 * The identity transfer: output = input
 * gamma functions
 * logarithmic functions
 * HDR: transfer functions for high dynamic range images ( HDR, HDRI )
 * The identity transfer: output = input
 * Normalizating function, Linear compression, the "-autolevel" function: For all inputs, outputs are in the range [0,1]. Divide by the maximum, then the maximum input is transformed to 1.0.
 * Compress highlights, For non-negatives input values, output values are in the range [0,1]. Negative inputs create negative outputs. The gradient at (0,0) is 1.0. At input=1, output=0.5. For large inputs, the output approaches 1.0 and the gradient approaches zero
 * S-curve: compress highlights and shadows
 * Compress shadows
 * Hybrid Log-Gamma (HLG) transfer function ( Hybrid Log Gamma HDR = HLG HDR)
 * Perceptual quantizer (PQ) transfer function

Image magic code convert \*.png -evaluate-sequence median MEDIAN.png

Color value

 * Color term
 * color specification in Gnuplot
 * colorhexa: Color encyclopedia : Information and conversion
 * html color codes
 * colour specifications by David Briggs
 * Colour difference coding in computing (unfinished) by Billy Biggs
 * color convert from colorjs library

format
Color can be specified using one of the formats
 * point in the space - direct color
 * hex RGB
 * hex RGBA
 * rgb
 * rgba
 * hsl
 * hsla
 * cmyk
 * name ( string)
 * indexed color: index number from color palette

Alpha color chanel
 * in OpenGl unintuitively, alpha = opaqueness, so alpha = 1 means fully opaque while alpha = 0 means fully transparent.

In PIL ( Python Imaging Library ) pixel color format is defined by modes :
 * 1 (1-bit pixels, black and white, stored with one pixel per byte)
 * L (8-bit pixels, black and white)
 * P (8-bit pixels, mapped to any other mode using a colour palette)
 * RGB (3x8-bit pixels, true colour)
 * RGBA (4x8-bit pixels, true colour with transparency mask)
 * CMYK (4x8-bit pixels, colour separation)
 * YCbCr (3x8-bit pixels, colour video format)
 * I (32-bit signed integer pixels)
 * F (32-bit floating point pixels)
 * LA (L with alpha)
 * RGBX (true colour with padding)
 * RGBa (true colour with premultiplied alpha).

Number type (precision)

 * integer ( natural numbers)
 * unsigned char = range from 0 to 255 which gives 256 numbers
 * integer
 * real number
 * float precision, example : 1.0f
 * double precision
 * hexadecimal color code (HEX color notation )
 * hex: A string representation of sRGB

Examples
 * in OpenGl each of color components has a value between 0.0 and 1.0 = in a range of [0,1]. Here 1.0 means as much of that color as possible, and 0.0 means none of that color.

glColor3f(0.5f, 0.0f, 1.0f); // (0.5, 0, 1) is half red and full blue, giving dark purple. glm::vec3 coral(1.0f, 0.5f, 0.31f); // coral color definition in glm library and C++

Example in GIMP
 * gray scale precision in Gimp
 * At integer precision
 * An 8-bit integer grayscale image provides 255 available tonal steps from 0 (black) to 255 (white).
 * A 16-bit integer grayscale image provides 65535 available tonal steps from 0 (black) to 65535 (white).
 * A 32-bit integer grayscale image theoretically will provide 4294967295 tonal steps from 0 (black) to 4294967295 (white). But as high bit depth GIMP 2.10 does all internal processing at 32-bit floating point precision, the actual number of steps will be no more than the number of tonal steps available in a 32-bit floating point image.
 * At floating point precision: the available number of tonal steps in a grayscale image depends on the specified bit depth (8-bit, 16-bit, or 32-bit)

See also:
 * computergraphics SE question: how-much-precision-half-float-double-etc-is-enough-for-a-color-class?rq=1

Alpha, composition, transparency and layers
Alpha
 * is the opacity or transparency of a color
 * will also impact contrast
 * is presented as a number between 0 (completely transparent) and 1 (completely opaque)
 * Reducing the alpha for an element will reduce its contrast because you are allowing an underlying color to bleed through

layers
 * Fractals and multi layer coloring algorithms  by Javier Barrallo and Santiago Sanchez

css syntax
This shade of blue may commonly be defined in three different ways in webpage styles:
 * rgb(97 97 255): The amount of red, green, and blue that form a color are each presented as a number between 0 and 255.
 * #6161FF: This is a "hexadecimal" format where the red/green/blue values are presented as a combination of six letters or numbers. Typically called "Hex," this is a very common format in webpages.
 * hsl(240 100% 69%): Hue, saturation, and lightness map more closely to the way people perceive colors. Changing the "lightness" of a color will change its contrast ratio to another color.

Lime color
 * color(a98-rgb 0.565 1 0.234)
 * color(a98rgb-linear 0.285 1 0.041)
 * color(acescc 0.466 0.548 0.373)
 * color(acescg 0.34 0.916 0.11)
 * hsl(120 100% 50%)
 * color(hsv 120 100 100)
 * hwb(120 0% 0%)
 * color(ictcp 0.54 -0.28 -0.05)
 * color(jzczhz 0.177 0.161 132.5)
 * color(jzazbz 0.177 -0.11 0.119)
 * lch(87.82 113.3 134.4)
 * lab(87.82 -79.3 80.99)
 * lab-d65(87.74 -86.2 83.19)
 * oklch(0.866 0.295 142.5)
 * oklab(86.64% -0.23 0.179)
 * color(display-p3 0.458 0.985 0.298)
 * color(p3-linear 0.178 0.967 0.072)
 * color(prophoto-rgb 0.54 0.928 0.305)
 * color(prophoto-linear 0.33 0.873 0.118)
 * color(rec2020 0.568 0.959 0.269)
 * color(rec2020-linear 0.329 0.92 0.088)
 * color(rec2100-hlg 0.511 0.733 0.264)
 * color(rec2100-pq 0.468 0.572 0.347)
 * color(xyz-abs-d65 72.59 145.2 24.2)
 * color(xyz-d65 0.358 0.715 0.119)
 * rgb(0% 100% 0%)
 * color(srgb-linear 0 1 0)

See also
 * LeaVerou: color.js ( Color conversion & manipulation library by the editors of the CSS Color specifications) and www page

color picker

 * color picker from colorjs library

color contrast
Contrast in visual perception is a felt difference in appearance of two or more parts of a field seen simultaneously or successively (hence:
 * brightness contrast,
 * lightness contrast,
 * color contrast,
 * simultaneous contrast
 * successive contrast
 * etc.

Contrast in physics is a quantity intended to correlate with the perceived brightness contrast, usually defined by one of a number of formulae (see below) which involve e.g. the luminances of the stimuli considered

A contrast can also be due to differences of chromaticity specified by colorimetric characteristics (e.g. the color difference ΔE CIE 1976 UCS).

The maximum contrast of an image is the contrast ratio or dynamic range.

Types
 * Simple contrast
 * Web Content Accessibility Guidelines (WCAG) Here contrast is a measure of the difference in perceived "luminance" or brightness between two colors. This brightness difference is expressed as a ratio ranging from 1:1 (e.g. white on white) to 21:1 (e.g., black on a white). On a white background pure red (#FF0000) has a ratio of 4:1, pure green (#00FF00) has a very low ratio of 1.4:1, pure blue (#000FF) has a contrast ratio of 8.6:1.
 * Accessible Perceptual Contrast Algorithm ( APCA)
 * Weber contrast, also often simply called Luminance Contrast
 * Delta Phi
 * L star
 * Michelson Contrast, also called Modulation or Peak-to-Peak Constrast

Wikipedia
 * Display_contrast
 * Color contrast
 * Luminance
 * Brightness is the term for the subjective impression of the objective luminance

Programs
 * leonardo: js package that Generate colors based on a desired contrast ratio

color quality

 * Colour Fidelity Index
 * Colour Rendering Index
 * Colour Quality Scale
 * Academy Spectral Similarity Index (SSI)
 * css Color Display Quality: the color-gamut feature . Value:	srgb | p3 | rec2020

title: Color Theory/Color for programmers


text:
Talk:Islamic Studies Grade 1/Lesson1.1

ISLAMIC KNOWLEDGE.
Islamic basic information Such is prayer,Truth,and honorable. Waspaa (discuss • contribs) 06:18, 14 November 2023 (UTC)

Prayer
Prayer is very important in the Muslims life.Every Muslim duty to five time prayer in every day. Waspaa (discuss • contribs) 06:28, 14 November 2023 (UTC)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Talk:Islamic Studies Grade 1/Lesson1.1


title: User:Jong356


text:
Chatbots For Social Change/Theory of LLMs

Resources
Introductory videos
 * What are LLMs by Google - A simple 5 minute introduction to what LLMs do.
 * What are LLMs by Apple (WWDC) - A great introduction to embeddings, tagging, and LLMs, in the first 6m. Then moves to the main topic, multilingual models.
 * Build an LLM from scratch - A good video introduction, paired with a blog, conceptualizing the process of going from zero to full-scale LLM ($1M later!).
 * Microsoft's infrastructure for training chatGPT, and similar incredibly high-throughput applications.
 * Uses DeepSpeed to optimize the training
 * InfiniBand for incredible network throughput
 * ONNX to move networks around (also see CRIU for an idea of how checkpointing works])
 * NVIDIA's tensor cores instead of GPUs for compute

Lectures
 * Introduction to Neural Networks - Stanford CS224N. A nice mathematical overview of Neural Networks.
 * Scaling Language Models - Stanford CS224N Guest Lecture. A general outlook of the rise in abilities of LLMs.
 * Building Knowledge Representation - Stanford CS224N Guest Lecture. Very useful to understand our methods for vector retrieval, but from a more general perspective.
 * Dot product has fast nearest-neighbor search algorithms (sub-linear).
 * Re-ranking is often necessary, because the dot-product is not necessarily so expressive.
 * Not all sets of vectors are easily indexed, "pathological," and to improve performance it can be beneficial to "spread them out," e.g.
 * Socially Intelligent NLP Systems - Nice! A deep-dive on how society impinges on language, and how that buggers up our models.
 * LangChain vs. Assistants API - a nice overview of two interfaces for deeper chatbot computation.
 * Emerging architectures for LLM applications, a look from the enterprise side, of architectures and their use. Covers RAG with vector search, Assistants, and general workflow of refining LLM models.
 * GPT from scratch - fantastic introduction to chatGPT, understanding exactly how it works (Torch), by Andrej Karpathy.
 * tokenization in GPT, a great intro by Andrej Karpathy, who has tons of other good lectures in this realm

Courses
 * NYU Deep learning - A fully-fledged online course, including many advanced topics, including Attention and the Transformer, Graph Convolutional Networks, and Deep Learning for Structured Prediction, for instance.
 * The textbook Understanding Deep Learning has accompanying exercises, and lecture slides

Textbooks
 * A Hacker's Guide to Language Models, by Jeremy Howard
 * Practical Deep Learning for Coders
 * Understanding Deep Learning, with this nice introduction talk
 * Dahl, D. A. (2023). Natural language understanding with Python: Combine natural language technology, deep learning, and large language models to create human-like language comprehension in computer systems. Packt Publishing.
 * Sinan Ozdemir. (2023). Quick Start Guide to Large Language Models: Strategies and Best Practices for Using ChatGPT and Other LLMs. Addison-Wesley Professional.
 * Zhao, W. X. et al. (2023). A Survey of Large Language Models (arXiv:2303.18223). arXiv.
 * Not exactly a textbook, but at 122 pages of dense referenced material it packs a punch, and should not be considered a resource to be consumed in one sitting.

Reranking
Reranking in the context of information retrieval is a two-step process used to enhance the relevance of search results. Here’s how it typically works:

 * First-Stage Retrieval: In the initial phase, a broad set of documents is retrieved using a fast and efficient method. This is often done using embedding-based retrieval, where documents and queries are represented as vectors in a multi-dimensional space. The aim here is to cast a wide net and retrieve a large candidate set of documents quickly and with relatively low computational cost.
 * Second-Stage Reranking: The documents retrieved in the first stage are then re-evaluated in the second stage to improve the precision of the search results. This stage involves a more computationally intensive algorithm, often powered by a Language Model (like an LLM), which takes the context of the search query more thoroughly into account. This step reorders (reranks) the results from the first stage, promoting more relevant documents to higher positions and demoting less relevant ones.

The reranking step is a trade-off between the relevance of the search results and the computational resources required. By using it as a second stage, systems aim to balance the speed and efficiency of embedding-based retrieval with the depth and relevance of LLM-powered retrieval. This combined approach can yield a set of results that are both relevant and produced within an acceptable timeframe and cost.

Contradiction Detection
The Stanford Natural Language Processing Group has worked on detecting contradictions in text and has created contradiction datasets for this purpose. They have annotated the PASCAL RTE datasets for contradiction, marked for a 3-way decision in terms of entailment: "YES" (entails), "NO" (contradicts), and "UNKNOWN" (doesn't entail but is not a contradiction). Additionally, they have created a corpus where contradictions arise from negation by adding negative markers to the RTE2 test data and have gathered a collection of contradictions appearing "in the wild".

Introduction to Large Language Models (LLMs)
Let's dive into the world of Large Language Models (LLMs). These are advanced computer programs designed to understand, use, and generate human language. Imagine them as vast libraries filled with an enormous range of books, covering every topic you can think of. Just like a librarian who knows where to find every piece of information in these books, LLMs can navigate through this vast knowledge to provide us with insights, answers, and even generate new content.

How do they achieve this? LLMs are built upon complex algorithms and mathematical models. They learn from vast amounts of text – from novels and news articles to scientific papers and social media posts. This learning process involves recognizing patterns in language: how words and sentences are structured, how ideas are connected, and how different expressions can convey the same meaning.

Each LLM has millions, sometimes billions, of parameters – these are the knobs and dials of the model. Each parameter plays a part in understanding a tiny aspect of language, like the tone of a sentence, the meaning of a word, or the structure of a paragraph. When you interact with an LLM, it uses these parameters to decode your request and generate a response that is accurate and relevant.

One of the most fascinating aspects of LLMs is their versatility. They can write in different styles, from formal reports to casual conversations. They can answer factual questions, create imaginative stories, or even write code. This adaptability makes them incredibly useful across various fields and applications.

LLMs are a breakthrough in the way we interact with machines. They bring a level of understanding and responsiveness that was previously unattainable, making our interactions with computers more natural and intuitive. As they continue to evolve, they're not just transforming how we use technology, but also expanding the boundaries of what it can achieve.

In this chapter, we'll explore the world of Large Language Models (LLMs) in depth. Starting with their basic definitions and concepts, we'll trace their historical development to understand how they've evolved into today's advanced models. We'll delve into the key components that make LLMs function, including neural network architectures, their training processes, and the complexities of language modeling and prediction. Finally, we'll examine the fundamental applications of LLMs, such as natural language understanding and generation, covering areas like conversational agents, sentiment analysis, content creation, and language translation. This chapter aims to provide a clear and comprehensive understanding of LLMs, showcasing their capabilities and the transformative impact they have in various sectors.

Definition and Basic Concepts
Foundations of Neural Networks

To truly grasp the concept of Large Language Models (LLMs), we must first understand neural networks, the core technology behind them. Neural networks are a subset of machine learning inspired by the human brain. They consist of layers of nodes, or 'neurons,' each capable of performing simple calculations. When these neurons are connected and layered, they can process complex data. In the context of LLMs, these networks analyze and process language data. The Structure of Neural Networks in LLMs

 * Input Layer: This is where the model receives text data. Each word or character is represented numerically, often as a vector, which is a series of numbers that capture the essence of the word.
 * Hidden Layers: These are where the bulk of processing happens. In LLMs, hidden layers are often very complex, allowing the model to identify intricate patterns in language. The more layers (or 'depth') a model has, the more nuanced its understanding of language can be.
 * Output Layer: This layer produces the final output, which could be a prediction of the next word in a sentence, the classification of text into categories, or other language tasks.

Training Large Language Models

Training an LLM involves feeding it a vast amount of text data. During this process, the model makes predictions about the text (like guessing the next word in a sentence). It then compares its predictions against the actual text, adjusting its parameters (the weights and biases of the neurons) to improve accuracy. This process is repeated countless times, enabling the model to learn from its mistakes and improve its language understanding. Parameters: The Building Blocks of LLMs

Parameters in a neural network are the aspects that the model adjusts during training. In LLMs, these parameters are numerous, often in the hundreds of millions or more. They allow the model to capture and remember the nuances of language, from basic grammar to complex stylistic elements. From Data to Language Understanding

Through training, LLMs develop an ability to understand context, grammar, and semantics. This isn't just word recognition, but an understanding of how language is structured and used in different situations. They can detect subtleties like sarcasm, humor, and emotion, which are challenging even for human beings. Generating Language with LLMs

Once trained, LLMs can generate text. They do this by predicting what comes next in a given piece of text. This capability is not just a parroting back of learned data, but an intelligent synthesis of language patterns that the model has internalized.

By understanding these fundamental concepts, we begin to see LLMs not just as tools or programs, but as advanced systems that mimic some of the most complex aspects of human intelligence. This section sets the stage for a deeper exploration into their historical development, key components, and the transformative applications they enable.

Historical Development of LLMs
The journey of Large Language Models began with rule-based systems in the early days of computational linguistics. These early models, dating back to the 1950s and 60s, were based on sets of handcrafted rules for syntax and grammar. The advent of statistical models in the late 1980s and 1990s marked a significant shift. These models used probabilities to predict word sequences, laying the groundwork for modern language modeling.

The 2000s witnessed a transition from statistical models to machine learning-based approaches. This era introduced neural networks in language modeling, but these early networks were relatively simple, often limited to specific tasks like part-of-speech tagging or named entity recognition. The focus was primarily on improving specific aspects of language processing rather than developing comprehensive language understanding.

The introduction of deep learning and word embeddings in the early 2010s revolutionized NLP. Models like Word2Vec provided a way to represent words in vector space, capturing semantic relationships between words. This period also saw the development of more complex neural network architectures, such as Long Short-Term Memory (LSTM) networks, which were better at handling the sequential nature of language.

The introduction of the Transformer model in 2017 was a watershed moment. The Transformer, first introduced in a paper titled "Attention Is All You Need," abandoned recurrent layers in favor of attention mechanisms. This allowed for more parallel processing and significantly improved the efficiency and effectiveness of language models. Rise of Large-Scale Language Models

Following the Transformer's success, there was a rapid escalation in the scale of language models. Notable models include OpenAI's GPT series, Google's BERT, and others like XLNet and T5. These models, with their vast number of parameters (into the billions), demonstrated unprecedented language understanding and generation capabilities. They were trained on diverse and extensive datasets, enabling them to perform a wide range of language tasks with high proficiency. Recent Developments: Increasing Abilities and Scale

The most recent phase in the development of LLMs is marked by further increases in model size and capabilities. Models like GPT-3 and its successors have pushed the boundaries in terms of the number of parameters and the depth of language understanding. These models exhibit remarkable abilities in generating coherent and contextually relevant text, answering complex questions, translating languages, and even creating content that is indistinguishable from human-written text.

Architecture
Large Language Models (LLMs), such as those based on the Transformer architecture, represent a significant advancement in the field of natural language processing. The Transformer model, introduced in the paper "Attention Is All You Need", has become the backbone of most modern LLMs.

The architecture of a Transformer-based LLM is complex, consisting of several layers and components that work together to process and generate language. The key elements of this architecture include:

 * Input Embedding Layer: This layer converts input text into numerical vectors. Each word or token in the input text is represented as a vector in a high-dimensional space. This process is crucial for the model to process language data.

 * Positional Encoding: In addition to word embeddings, Transformer models add positional encodings to the input embeddings to capture the order of the words in a sentence. This is important because the model itself does not process words sequentially as in previous architectures like RNNs (Recurrent Neural Networks).
 * Encoder and Decoder Layers: The Transformer model has an encoder-decoder structure. The encoder processes the input text, and the decoder generates the output text. Each encoder and decoder consists of multiple layers.
 * Each layer in the encoder includes two sub-layers: a multi-head self-attention mechanism and a simple, position-wise fully connected feed-forward network.
 * Each layer in the decoder also has two sub-layers but includes an additional third sub-layer for attention over the encoder's output.
 * Self-Attention Mechanism: This mechanism allows the model to weigh the importance of different words in the input sentence. It enables the model to capture contextual information from the entire sentence, which is a key feature of the Transformer model.
 * Multi-Head Attention: This component splits the attention mechanism into multiple heads, allowing the model to simultaneously attend to information from different representation subspaces at different positions.
 * Feed-Forward Neural Networks: These networks are applied to each position separately and identically. They consist of fully connected layers with activation functions.
 * Normalization and Dropout Layers: These layers are used in between the other components of the Transformer architecture to stabilize and regularize the training process.
 * Output Layer: The final decoder output is transformed into a predicted word or token, often using a softmax layer to generate a probability distribution over possible outputs.

The Transformer architecture is highly parallelizable, making it more efficient to train on large datasets compared to older architectures like RNNs or LSTMs. This efficiency is one of the reasons why Transformer-based models can be scaled to have a large number of parameters and process extensive language data.

For more detailed information on the Transformer architecture, see the WikiPedia Transformer page.

Chain-of-Thought Prompting
Graph of Thoughts paper, which has a nice exposition of chain-of-thought, and tree-of-thought prompting.

Advanced Applications of LLMs
Hadi et al.'s (2023) 44-page survey offers a solid and recent resource here.


text:
Chess Opening Theory/1. Nf3/1...d5/2. g3/2...c5/3. Bg2/3...Nc6

3…Nc6

The French variation, where black wants to play …e5 and claim even more space.

White's responses

4.O-O, going in the style of the traditional King's Indian Attack.

4.d4, the Reversed Grunfeld.


text:
Chess Opening Theory/1.Nf3/1…d5/2. g3/2…c5/3. Bg2/3…Nc6/4. d4

Reversed Grünfeld

With 4. d4, white enters the reversed Grunfeld where play can be very sharp. The d-pawn immediately confronts black's centre and forces a response.

Black may respond with 4…cxd4, entering a reversed exchange Grünfeld. However, they may also respond with 4…e6, discovering the f8 bishop's defense of the c4 pawn.


text:
Chatbots For Social Change/Designing Democracy

Dirk Helbing succinctly expresses the need and potentials of a digital upgrade to society. He seems quite interested in the applications of upgraded money (in particular, multi-dimensional money) on the revolution and intelligent control of our incentive systems, and thus our organizational principles. I'm more interested in a deeper question, which he also addresses extensively, especially in his book Next Civilization. He discusses such concepts as "computational diplomacy" and "digital democracy".

To ensure fairness in public sector models, we imagine a future where the people developing these models clearly explain the values behind their assumptions and choices, especially when those choices can affect society. By prioritizing decisions that uphold democratic principles, we can address biases and prevent the unfair outcomes that can result from a top-down approach.

- Helbing (2021) Next Civilization

The most comprehensive, recent resource which consolidates the wide variety of prior work in this area, and giving perspective, is

Free Speech
As the UN Universal Declaration of Human Rights puts it,

The right to hold own opinions has at least three pillars:
 * 1) The possibility to get access to relevant information with a reasonable effort (in particular, to the facts, which should be recognizable as such).
 * 2) The chance to form an own opinion without being manipulated in that process.
 * 3) Sufficient and appropriate opportunities to voice own opinions without fear of being punished, and without censorship.

I see this project as critically aiding in and being guided by this form of the call to the right of free speech and the freedom to hold opinions.

Secondly, As has been put a thousand ways by academics, and as is easily recognized by most in the world at this point, there are significant manipulations of popular opinion happening on a grand scale. In the United States, this involves destruction of popular trust in science, highly funded and sophisticated propaganda campaigns funded by billionaires or conducted by the military industrial complex which re-write textbooks, legislation, and media reports.

And finally, individuals in the U.S. can (for the most part) speak their minds. However, the extent to which they are heard, listened to, recognized, is not a matter of impartial considerate deliberation, of equal weight. Understanding is resource-intensive, and exposure is subject to the whims of the algorithm. In other words, to the features of the presentation, and a winner-takes-all attention space. This leaves most which is spoken, completely unheard. And what bubbles to the top, which rings in our ears, is only a very selective sample of the universe of understanding. Helbing puts this in the language of complex systems as follows:

[...] asymmetrical interactions may lead to relative advantages of some people over others, the system may get stuck in a local optimum. The global optimum reached when interactions are symmetrical may be better for everyone.


text:
Chatbots For Social Change/Collective Action

Collective action lies at the heart of societal transformation. It represents the concerted effort of individuals and groups to achieve shared objectives. In the context of the digital era, chatbots, powered by advanced artificial intelligence, have emerged as key players in facilitating collective action. They have the potential to act as catalysts in global conversations, influencing social change.

Theoretical Foundations
Collective intelligence is crucial for the success of collective action. The research by Riedl et al. (2021) underscores the importance of equitable participation within groups. In a world increasingly mediated by chatbots, these digital interlocutors can democratize conversations, ensuring diverse voices are heard and valued. Moreover, chatbots can augment the collective decision-making process, contributing to the group's overall intelligence and performance.

Persuasion-oriented methods of collective action, such as those used in political campaigns or advocacy efforts, often risk exacerbating social divides. Here, chatbots can offer a solution by providing platforms for rational and balanced discourse, potentially linking to democratically compiled sources like Wikipedia to counteract misinformation.

Tarrow’s contentious politics provide a framework for understanding the dynamics of collective action in confrontational settings. Chatbots, designed with the principles of contentious politics in mind, could facilitate the organization and mobilization of collective actors, thus becoming tools for orchestrating social movements and driving political participation.

Case Studies and Applications
Taiwan's Digital Democracy initiatives, such as vTaiwan and Pol.is, exemplify the successful application of digital platforms in enhancing transparency and fostering collective action. These platforms could be further evolved by integrating chatbots, which would serve as mediators and aggregators of public opinion, enhancing the deliberative process.

Participatory Budgeting represents a direct application of collective action in governance. Chatbots could revolutionize this process by engaging with citizens, gathering their preferences, and helping them understand the implications of budgetary decisions, thus reinforcing the Lefebvre’s “right to the city” principle.

The polarization in the United States demonstrates the potential pitfalls of collective action when it leads to societal division. Chatbots could be programmed to recognize signs of polarization, intervening to introduce alternative perspectives and mediate discussions, thereby promoting social cohesion.

Methods and Strategies in Collective Action
The modular performances and repertoires of collective action described by Tarrow can be seen as a precursor to the adaptability required of chatbots in social change scenarios. These digital entities must be capable of operating in varied contexts, advocating for diverse causes, and engaging with different target audiences.

Challenges in Collective Action
Olson's Logic of Collective Action identifies the free-rider problem as a significant challenge in collective endeavors. Chatbots could mitigate this issue by providing personalized incentives for participation and by tracking and rewarding contributions to collective goals.

Impact and Implications
The role of chatbots in collective action extends beyond mere facilitation; they embody the potential for substantial social impact. By leveraging large language models and artificial intelligence, chatbots could unify disparate knowledge bases, serve as platforms for marginalized voices, and contribute to the formation of a more informed and engaged citizenry.

Conclusion
Chatbots are poised to become indispensable in the landscape of collective action. This chapter has delved into the theoretical underpinnings of collective action, explored its application in the digital age, and highlighted the transformative potential of chatbots in promoting social change. As architects of this new digital frontier, we must ensure that the development of chatbots is guided by ethical considerations, inclusivity, and a commitment to fostering constructive dialogue.


text:
User:Mikayla Clarke

Find the probability of a particle being located in the bottom left quadrant of the ground state of the particle in a square.

Particle In a Square (2D)
The particle in a square model is where a particle in confined to a restricted

region inside a 2D box. For this model we consider a particle which is free to move

anywhere inside the x,y dimensions but cannot exist outside of the 2D box where it would

have infinite potential.

The conditions for the potential energy are $$\nu= \begin{Bmatrix} \infty, & x<0,y<0 \\ 0, & 0\leq x, y\leq L \\\infty, & x,y>L \end{Bmatrix}$$

Since the particle in a square is a 2D model the wave function must take into account the x and y direction ; $$(\Psi(x,y)) $$

The wave function for a particle in a square
$$\Psi(x,y)=\frac{2}{L} sin\left ( \frac{n_x\pi}{L} x\right )\left ( \frac{n_y\pi}{L} y\right )\cdot\frac{2}{L} sin\left ( \frac{n_x\pi}{L} x\right )\left ( \frac{n_y\pi}{L} y\right )$$

The state the quantum system is in are defined by the quantum numbers $$n_x, n_y $$

Probability Distributions
The probability of a particle being found in an interval can be found by integrating the probability distribution

The probability of finding a particle in the range $$\left [ a_1,a_2 \right ] $$,$$\left [b_1,b_2 \right ] $$ is given by; $$P =\int\limits_{a_1}^{a_2} \int\limits_{b_1}^{b_2 } P(x,y)dxdy$$

The probability distribution of a a particle is the wave function squared.

For one particle in 2D (particle in a box):

$$P(x,y)=\left \vert \Psi(x,y)^2 \right \vert= \Psi(x,y)^* \cdot \Psi(x,y) $$ ,where * is the complex conjugate of the wave-function

Therefore the probability of finding a particle over a range can be re-written as:

$$P = \int\limits_{a_1}^{a_2} \int\limits_{b_1}^{b_2 } \Psi^* \bigl(x,y)\Psi \bigl(x,y)dxdy$$

Solution
If the particle is in the bottom left quadrant it is in the interval; $$x=\left [ 0, \frac{ L}{2} \right ] $$ $$y=\left [ 0, \frac{ L}{2} \right ] $$

Therefore the probability density is:

$$P =\int\limits_{0}^{ \tfrac{L}{2} } \int\limits_{ 0}^{ \tfrac{L} {2} } \Psi^* \bigl(x,y)\Psi \bigl(x,y)dxdy$$

The wave-function for a particle in a square is:

$$\Psi(x,y)=\frac{2}{L} sin\left ( \frac{n_x\pi}{L} x\right )\left ( \frac{n_y\pi}{L} y\right )\cdot\frac{2}{L} sin\left ( \frac{n_x\pi}{L} x\right )\left ( \frac{n_y\pi}{L} y\right )$$

In the ground state $$n_x =1$$ $$n_y =1$$, therefore the probability distribution can be written as:

$$P = \int\limits_{ 0}^{ \frac{L}{2}} \int\limits_{ 0}^{ \frac{L} {2}} \biggl ({2 \over L}\biggr) sin \left ( \frac{\pi}{L }x \right ) sin \left ( \frac{\pi}{L }y \right )\centerdot\biggl ({2 \over L}\biggr) sin \left ( \frac{\pi}{L }x \right ) sin \left ( \frac{\pi}{L }y \right )dx dy$$

Then solving the integral,

$$P= \left ( \frac{4}{L^2} \right )\int_{0}^{\frac{L}{2}} sin^2 \left ( \frac{ \pi}{ L} x\right ) sin^2 \left ( \frac{\pi}{ L} y\right ) dx dy$$

$$P= \left ( \frac{4}{L^2} \right )\int_{0}^{\frac{L}{2}} sin^2 \left ( \frac{ \pi}{ L} x\right )dx \cdot sin^2 \left ( \frac{\pi}{ L} y\right ) dy$$

Using the integral- from table

$$\int sin^2(ax)dx=\frac{x}{2}- \frac{sin(2ax)}{4a} $$

$$P= \left ( \frac{4}{L^2} \right )\left [ \frac{ y}{2} - \frac{sin\bigl(2 \frac{\pi}{L}y \bigr)}{4\left ( \frac{\pi}{L} \right )} \right ]_0^L \left [ \frac{ x}{2} - \frac{sin\bigl(2 \frac{\pi}{L}x \bigr)}{4\left ( \frac{\pi}{L}  \right )} \right ]_0^L $$

$$P= \left ( \frac{4}{L^2} \right )\Biggl( \frac{ \frac{L}{2}}{2} - \frac{Lsin\bigl(2 \frac{\pi}{L}\frac{L}{2} \bigr)}{4\left ( \pi \right )} \Biggr) \Biggl( \frac{ \frac{L}{2}}{2} - \frac{Lsin\bigl(2 \frac{\pi}{L}\frac{L}{2} \bigr)}{4\left ( \pi  \right )} \Biggr) $$

$$P= \left ( \frac{4}{L^2} \right ) \Biggl( \frac{L}{4} - \frac{Lsin\bigl(\pi \bigr)}{4\left ( \pi \right )} \Biggr) \Biggl(  \frac{L}{4} - \frac{Lsin\bigl(\pi \bigr)}{4\left ( \pi  \right )} \Biggr) $$

Since $$sin\pi $$ is zero the whole term goes to zero

$$P= \left ( \frac{4}{L^2} \right )\Biggl(\frac{L}{4}-0\biggr) \Biggl(\frac{L}{4}-0\Biggr) $$

$$P= \frac{4}{8} $$

$$P= \frac{1}{4}$$

Therefore the the probability of finding a particle in the bottom left quadrant of a square in the ground state is 0.25 of 25%.

title: User:Mikayla Clarke


text:
User:Minkyisa

1.1 Wave Function
Wave is a verb meaning "to move back and forth". Oscillations happen when a build-up of an opposing force, such water waves, springs, or pendulums, counteracts displacements in either direction. The reason it's called a "wave" function is because it satisfies a wave equation, known as the Schrödinger equation. This equation describes how the wave function evolves over time, much like how classical wave equations describe the propagation of waves in classical physics. So, the term "wave function" reflects both the wave-like behavior of quantum entities and the mathematical form of the function, which satisfies a wave equation. The Schrödinger equation is also 2nd order; for free electron, it has the same oscillatory “wave” solution and is given by;

$$\frac{\ d^2\Psi(x)}{dx^2} = - \frac{\ 2mE}{\hbar^2} * \Psi(x)$$

1.2 Free Electron
An electron is said to be free if it can move along the x-axis in any direction without any force acting on it (i.e., 𝒱 𝑥 = 0, 𝑥 = −∞, ∞ ). It is not bound by an external force, or equivalently not in a region where its potential energy varies. In quantum mechanics, it indicates that the particle is in a region of uniform potential, which is often set to zero in the area of interest because any point in space can have an arbitrary potential set to zero.

The wave function of a free electron is typically represented as a plane wave, which is a solution to the Schrödinger equation. The Schrödinger equation is a fundamental equation in quantum mechanics that describes how the quantum state of a physical system changes with time. The wave function of a free electron can be written as:

$$\psi(x,t) = A * e^(i(kx-wt))$$

where:

- $$\psi(x,t) $$ is the wave function, which depends on position x and time t,

- $$\mathcal{A}$$ is the amplitude of the wave,

- k is the wave number, which is related to the momentum of the electron,

- $$\omega$$ is the angular frequency, which is related to the energy of the electron,

- $$\imath$$ is the imaginary unit.

2.1 Derive the wave function of a free electron
Time-independent Schrödinger wave equation is given by;

$$\widehat{H}\Psi = E \psi$$

$$(\hat{\Tau} + \widehat{V}) \psi = E \psi$$

Next define the Hamiltonian,

$$\widehat{H} = \widehat{T} + \widehat{V}$$

Substitute the potential energy operator

$$\widehat{V} = V(x) = 0 $$  (free electron)

and the kinetic energy operator

$$\widehat{T} =   $$ $$\frac{-\hbar^2}{2m}\frac{\ d^2}{dx^2}$$

$$(\hat{\Tau} + \widehat{V}) \psi = E * \psi$$

$$(-\frac{\hbar^2}{2m}\frac{\ d^2}{dx^2} + 0 ) \Psi(x) = E*\Psi(x)$$

To obtain the Schrödinger equation for a free particle, rearrange the differential equation; isolate 2nd derivative on LHS

$$- \frac{\hbar^2}{2m}\frac{\ d^2\Psi(x)}{dx^2} = E\Psi(x)$$

and make the substitution

$$k^2 = \frac{2mE}{\hbar^2}$$

Since $$\Epsilon$$ is the kinetic energy,

$$\Epsilon = \frac{p^ 2}{2m}$$

p and the wave vector k are related, p = $$\hbar$$k

we also could recognize that $$ \frac{2mE}{\hbar^2}$$ is just $$k^2$$ as shown in this equation

$$ \frac{2mE}{\hbar^2} = (\frac{2m}{\hbar^2}) (\frac{p^2}{2m}) $$

$$ = (\frac{2m}{\hbar^2}) (\frac{\hbar^2 k^2}{2m}) $$

$$ = k^2 $$

after rearranging and substitution of result from equation, the result is

$$ (\frac{d^2}{d x^2} + k ) \psi(x) =    $$ $$  0   $$

This linear second-order differential equation can be solved by separating into two factors, and each is set equal to 0.

$$ (\frac{d^2} {d x^2} + k^2)     $$$$  \psi(x)    $$$$  =    $$ $$  (\frac{d } {d x } + ik)     $$ $$  (\frac{d } {d x } - ik)     $$$$  \psi(x)    $$$$  =    $$$$  0   $$

Equation is true if either

$$ (\frac{d } {d x } + ik)     $$$$  \psi(x)    $$$$  =    $$$$  0   $$

$$ (\frac{d } {d x } - ik)     $$$$  \psi(x)    $$$$  =    $$$$  0   $$

By concurrently rearranging and denoting the two equations and their solutions with a + and a - sign, the result is

$$ \frac{d \psi_\pm (x) }{\psi_\pm (x)}     $$ $$  =    $$ $$  \pm     $$ $$  ik      $$ $$  dx     $$

which translates to

$$ l n     $$ $$  {\psi_\pm (x)}     $$ $$  =    $$ $$  \pm     $$ $$  ikx      $$ $$  +  $$$$  {C_\pm (x)}     $$

and finally

$$ {\psi_\pm (x)}     $$$$  =    $$ $$  A_\pm      $$$$  e^i     $$$$  ^k     $$$$  ^x     $$

Any function that satisfies the requirements of wave functions and is a solution to this differential equation is a valid wave function for this system

Reference

 * 1) Libretexts. (2022, April 21). 5.1: The Free Particle. Chemistry LibreTexts. https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Book_Quantum_States_of_Atoms_and_Molecules_(Zielinksi_et_al)/_Translational_States/_The_Free_Particle
 * 2) Anderson, J.M. Introduction to Quantum Chemistry, 1969, W.A. Benjamin, Inc, pg.81-91.

title: User:Minkyisa


text:
Mobility 2050/Retrofitting Suburbia

In the mid-twentieth century, the United States saw a departure of middle and upper class urban dwellers from city centers to developing suburban communities. This was driven by the baby boom and the ideal of quiet neighborhoods, spacious yards, white picket fences, and room for a family. Along with this demographic shift came increasing rates of car ownership; long commutes became the norm. Today, a travel time of at least 15 minutes to schools, grocery stores, and activities is standard.

But, the era of unsustainable growth in suburbia is ending. 29% of greenhouse gas (GHG) emissions are attributed to transportation in the U.S. and suburban dwellers are three times more GHG emissions than urbanites. Furthermore, intensifying impacts of climate change are influencing people’s lifestyle choices. The societal shift towards denser communities is driven not only by the desire for vibrant communities, but also land stewardship and an aging population. By 2050, 75-85% of suburban homes will not have children .Therefore, it is critical to reimagine our suburbs, particularly those of Northern Virginia (NOVA) which will have a population of three million by 2050. With that pressure, will NOVA build up or out? Existing trends in retrofitting suburbia in Arlington, Alexandria, and Fairfax County, inform a 2050 projection of suburbia in NOVA. Resilient and attractive suburbs require reformed zoning codes, improved connectivity and micromobility, repurposed building complexes, and reconstruction of wetlands and green spaces.

In Northern Virginia, Arlington County has pioneered the construction of denser commercial and residential areas. It is America’s fourth-smallest county in terms of land size, but is home to 227 thousand people and over 40 million square feet of office space, which is more than that of downtown Denver and Dallas. Even though NOVA’s population has doubled since the 1970s, car traffic in the county has actually decreased. Beginning in the 60s and 70s, city council has played a major role in fighting federal roadway expansion projects and welcoming public transportation from D.C. First, the county prevented the federal government from expanding Interstate 66 through the middle of Rosslyn. Instead, they vouched for the present-day route along the edge of Arlington County and the Potomac River. Secondly, the county invested heavily in constructing a subway  with seven metro stations beneath the heart of Arlington. Lastly, the city has encouraged high rise apartment buildings and townhomes, juxtaposing itself from Washington’s strict building height limits. The two square mile Rosslyn-Ballston corridor added over 15 million square feet of office space, and 15 thousand residential units from 1970-2000. This allowed for walkable and sustainable urban lifestyles to flourish, which has mitigated sprawl and the environmental impacts of auto-centric development. Furthermore, lower obesity levels, heart disease, and more organic social interaction can be directly attributed to this type of development. Proximity to shopping, entertainment, and shared green spaces improves physical and mental health. Arlington is a true success story in achieving a retrofitted suburb, where space is used efficiently and healthier modes of transportation are the norm. This is example is representative of a positive future projection of NOVA: densification and heavy public transportation where there is demand.

Many unused buildings in Northern Virginia have recently been refurbished and repurposed. The Inova Alexandria Hospital project in western Alexandria, VA was constructed on top of the demolished Landmark Mall. Alongside the hospital, the project features a mixed use, urban community with retail space, apartments, townhomes, and a regional bus transit station. Unlike the previous mall, this project features no surface parking lots and instead opts for a single parking garage and street parking. This project, which will be completed in 2028, shows how the future of NOVA suburbia will shift away from low density, single use, car-oriented zoning and towards compact, mixed use, transit-connected developments.

Projects known as “road diets” involve re-striping and adding concrete features to decrease the number of car lanes on busy roadways. Other road diet features include new bike lanes, widened sidewalks, curbs and medians at intersections. A typical four-lane road may be converted into a two-lane road, and the extra space is dedicated to a turning lane and bike throughways. One of the many examples in Northern Virginia is Soapstone Drive in Reston. "Dropping in" on Google Maps shows that the road in 2009 around the 2300 block followed a typical pre-road diet design: 4 lanes and parking. The same location today has the typical road diet design: two travel lanes, a turning lane, bike lanes in both directions, parking, and a new sidewalk. Ohlms, Dougald, and MacKnight (2020) performed an analysis of the efficacy of Virginia road diets, including Soapstone Drive, through the Virginia Transportation Research Council. They noted a 70% decrease in crashes while travel times remain the same. 47% of survey respondents indicate they cycle more on Soapstone Drive, and 69% perceive the road to be safer than before. Given the prevalence of road diets in NOVA, their technical success, and their popularity with locals, more of these projects will likely be built by 2050.

Electric vehicle (EV) popularity has soared recently in light of the climate crisis. In such a car-centric place like NOVA, there is growing demand for more EV charging infrastructure. In 2020, the Virginia legislature passed a “right-to-charge” law, ensuring that homeowner/condominium associations cannot restrict a resident from installing EV charging stations on property owned by a resident. Furthermore, in 2021 the VA legislature passed a “Clean Car” law mandating that all new vehicles sold must be electric by 2035. Currently, there are ~1300 charging stations in the state, and the total number has increased 75% since 2020. There is increased demand for EV infrastructure to support the transition to a more sustainable transportation system. Rep. Adele McClure, D-Arlington, oversees the Commission on Electric Utility Regulation to oversee the design standards and requirements to safely bring charging capabilities into new housing developments. McClure questioned constituents to learn where they most would most like to see new infrastructure built. Common answers were nearby places of work, study, public parking lots, and proximity to major roads. “I started thinking about ways where we can ensure that there are more charging stations, especially when it comes to new [home] builds,” said McClure, and she emphasized the need to develop “easy-ready and EV-capable residential communities.” Local and state legislation are tools to shape the evolution of NOVA’s infrastructure to create an easy transition to EV usage. The positive trend of EV use and the support from the government suggest that NOVA in 2050 will have hassle-free EV ownership and therefore more transportation options for all.

In March 2023, updates and declarations for zoning reform were issued by the Virginia Supreme Court and various counties. The Arlington County Board voted unanimously to allow multifamily structures (up to six units) in neighborhoods that were previously designated as R-20, 10, 10T, 8, 6, and 5 (single-family, detached homes). They also expanded the maximum lot coverage and varied parking requirements based on transit proximity. In Fairfax County, the Zoning Ordinance Modernization Project (zMOD) aims to correct inconsistencies in codes and promote user engagement by making zoning information more accessible. Fairfax County adopted the zMOD initiative in 2021, but the Virginia Supreme Court overturned it in March 2023 due to insufficient improvements in zoning functionality. That said, both Arlington's zoning reform and the zMOD project in Fairfax County exemplify a surge in civilian involvement concerning zoning codes. They reflect a trend towards the densification of residential properties and inform a 2050 projection of Northern Virginia’s zoning reform.

The County of Fairfax has published a Communitywide Strategic Housing Plan to respond to growing housing needs. It was initiated five years ago, but the COVID-19 pandemic exacerbated the growing pressure on the Fairfax County Redevelopment and Housing Authority (FCRHA) to supply affordable housing. The pandemic has resulted in the rapid urbanization of Virginia suburbs and urban centers. This is true for towns and cities outside of NOVA as well. Hamilton Lombard, a demographics research specialist with the University of Virginia, says “Even the tiny town of Covington has stronger demographics than its rural neighboring areas. We see the same trend everywhere – in Harrisonburg versus Rockingham County, stronger growth in Charlottesville than Albemarle”. The FCRHA has responded to this demand by identifying underutilized parcels in the county’s possession that can be transformed into affordable housing. In 2020, the County Board of Supervisors approved a plan to retrofit the Fair Oaks Mall, building 2,000 housing units and converting parking lots to street grids, shops, restaurants, and office space. Furthermore, right across I66 is the Fairfax County Government Center, where over 800,000 square feet of parking is unused. This lot is also being considered for the construction of affordable housing units. As District Supervisor James Walkinshaw states, “I was always astounded by the thousands and thousands of parking spaces at the government center. In the past there was a sense it was useful to have that vast surface parking that was never full, but if we’re serious about our affordable housing agenda, then we have to start in our own front yard”. Existing affordable housing units, Residences at Government Center, are highlighted in red in Figure 1. Given that the Fair Oaks Mall retrofit plan includes a pedestrian bridge across I66, this entire area has the potential to become a dense, urban hub at an affordable price for residents. Additionally, FCRHA’s focus on identifying underutilized parking lots for infill projects shows the northern Virginia county’s initiative for a denser, more urban 2050.

Solutions to retrofitting suburbia extend beyond urban contexts. Restoring natural environments is a crucial component of improving suburbs. As vast swaths of land were developed in the mid-twentieth century, wetlands and green spaces were paved over for parking lots and buildings. This trend has left suburbs more vulnerable to flooding amid intensified storm events. In the late 1980s in Fairfax County, VA, Huntley Meadows Park wetlands suffered from silt pollution due to encroaching suburban expansion and construction. Consequently, the draining of these wetlands drove away beavers and their dams, resulting in a drop in water levels. This aridification enabled invasive plant species to further disrupt the ecological balance. In 2013, beavers returned after a restoration project aimed at regulating water levels was completed. Now, the wetland has been transformed into a recreational area and an effective stormwater management system. This success story underscores the potential for suburban revitalization by integrating nature-centric solutions in these communities and shows the potential for similar projects by 2050.

Critics of the trends exemplified by these case studies fear a change in their lifestyle. Many people want to live in a cul-de-sac and drive everywhere. When activists promote a dense, multimodal future, suburbanites envision their neighborhoods becoming targets for teardowns. The reality is that million-dollar homes in NOVA will not be torn down. Instead, zoning reforms will permit the construction of secondary housing units and voluntary densification on properties that were previously designated for single-family detached homes. This presents a revenue opportunity for current suburban residents and private developers. Underutilized sites and transportation features will be revitalized, and NOVA residents will have more mobility choices than driving.

There are some roadblocks to achieving these goals and vision for suburban redevelopment. Zoning and legislative reforms require persuading residents, property owners, and municipal and federal government leaders. Redeveloping abandoned infrastructure requires landowners that are willing to sell their properties. Repurposing mall spaces requires owners to accept changes to the layout and uses of their malls. There is a need for strong grassroots organizing and civic leadership in order to lead the charge on these matters, and to overcome institutional roadblocks. Lastly, redevelopment requires property owners to be risk tolerant.

Like all civil and urban planning matters, satisfying all stakeholders is challenging. But regardless, there is a strong imperative for revitalizing such regions. Case studies in Northern Virginia unveil strategies for densifying sprawl. Examining these approaches illustrates NOVA’s evolution by 2050 as an ecologically balanced, denser, and better connected region. New zoning amendments enable the development of multifamily residences and mixed-use complexes, while limiting parking space in areas with access to high-quality public transit. Increased investment in rail and shared mobility by VDOT and transportation authorities will reduce car dependence. Dieting roadways will improve safety for all users. Moreover, extensive trail networks among cul-de-sacs and meandering streets combined with localized urban centers can improve micromobility. Underused office spaces, parking lots, and malls can be transformed into vibrant, functional urban hubs. Challenges like the heat island effect and severe storms require natural revitalization, converting paved areas into green spaces and wetlands. The current policies and construction projects in NOVA show the trajectory of the region’s built environment and transportation and offer a vision of retrofitting suburbia by 2050.

title: Mobility 2050/Retrofitting Suburbia


text:
IB/Group 3/Geography

Introduction
Welcome to the IB Geography Wikibook. Here, you can see the different topics (Paper 1, 2 and 3) as well as the optional themes.

title: IB/Group 3/Geography


text: Category:Book:Mobility 2050

title: Category:Book:Mobility 2050


text:
The Linux Kernel/Debugging

Performance
There are many factors that can affect the performance of the Linux kernel, including hardware configurations, software configurations, and workload characteristics.

In this context, performance optimization of the Linux kernel involves identifying and addressing performance in the system. This can involve tuning kernel parameters, optimizing system resources, and identifying and fixing bugs and other issues that may be impacting performance.

Given the complexity of the Linux kernel and the wide range of factors that can affect performance, performance optimization can be a challenging task. However, with the right tools and techniques, it is possible to significantly improve the performance and reliability of Linux-based systems.

, short for performance events, is a powerful interface that provides detailed insights into the performance characteristics of software running on a system. By analyzing the data collected by perf_events, developers can identify performance bottlenecks and optimize software to improve performance and reduce resource utilization. Perf_events is designed to be a lightweight, low-overhead monitoring solution that has minimal impact on system performance.

🔧 TODO

⚲ Interfaces
 * – performance analysis tools

 * Basic commands:
 * – display help information about perf
 * – System profiling tool.
 * – Run a command and record its profile into perf.data
 * – Read perf.data (created by perf record) and display th...
 * Other commands:
 * – Read perf.data (created by perf record) and display an...
 * – Create archive with object files with build-ids found ...
 * – Support for Arm Statistical Profiling Extension within...
 * – General framework for benchmark suites
 * – Manage build-id cache.
 * – List the buildids in a perf.data file
 * – Shared Data C2C/HITM Analyzer.
 * – Get and set variables in a configuration file.
 * – Run record sessions on background
 * – Data file related processing
 * – Read perf.data files and display the differential profile
 * – Filter sample events using a dynamically loaded shared...
 * – List the event names in a perf.data file
 * – simple wrapper for kernel's ftrace functionality
 * – Filter to augment the events stream with additional in...
 * – Support for Intel Processor Trace within perf tools
 * – Show I/O performance metrics
 * – Searches running kernel for symbols
 * – Tool to trace/measure kernel memory properties
 * – Tool to trace/measure kvm guest os
 * – Tool to trace/measure kernel work properties (latencies)
 * – List all symbolic event types
 * – Analyze lock events
 * – Profile memory accesses
 * – Define new dynamic tracepoints
 * – Tool to trace/measure scheduler properties (latencies)
 * – Read perf.data (created by perf record) and display tr...
 * – Process trace data with a Perl script
 * – Process trace data with a Python script
 * – Run a command and gather performance counter statistics
 * – Runs sanity tests.
 * – Tool to visualize total system behavior during a workload
 * – strace inspired tool
 * – display the version of perf binary

 * – sets up performance monitoring

🛠 Utilities
 * , https://pcp.io/ – Performance Co-Pilot
 * , https://prometheus.io/
 * https://github.com/redhat-nfvpe/container-perf-tools
 * https://github.com/brendangregg/perf-tools – performance analysis tools based on Linux perf_events (aka perf) and ftrace
 * readprofile – a tool to read kernel profiling information

⚙ Internals
 * – simple profiling
 * – simple profiling
 * – simple profiling

📚 References
 * stress-ng – exercises various kernel interfaces
 * – instruments CPU performance counters, tracepoints, kprobes, and uprobes
 * https://perf.wiki.kernel.org/
 * http://trac.gateworks.com/wiki/linux/profiling
 * Analyzing application performance in RHEL 9
 * Monitoring and managing system status and performance in RHEL 9
 * The Unofficial Linux Perf Events Web-Page
 * Real-time Linux

User space debug interfaces
⚲ Interfaces
 * – prints or control the kernel ring buffer
 * – system call, which is used to control the kernel printk buffer
 * – system calls and signals tracing tool
 * – process trace system call
 * /sys/kernel/debug/ –
 * dmesg --console-level
 * gdb /usr/src/linux/vmlinux /proc/kcore
 * /proc/self/stack
 * gdb /usr/src/linux/vmlinux /proc/kcore
 * /proc/self/stack

 * debug
 * ⌨ hands-on:
 * echo "module atkbd +pfl" | sudo tee /sys/kernel/debug/dynamic_debug/control

⚙ Internals

📚 References

Tracing and logging
⚲ API:

User-space interface:
 * – prints or control the kernel ring buffer
 * – system call, which is used to control the kernel printk buffer
 * /proc/kmsg

Most common functions

 * - conditional debug-level message
 * - conditional debug-level or message
 * ⌨ hands-on:
 * echo "module atkbd +pfl" | sudo tee /sys/kernel/debug/dynamic_debug/control
 * Log messages with other levels:
 * Log messages with other levels:

⚙ Internals

📚 References:
 * Debugging by printing
 * – systemtap script translator/driver
 * – trace system calls and signals
 * – function, latency and event tracing
 * – trace system calls and signals
 * – function, latency and event tracing
 * – function, latency and event tracing
 * – function, latency and event tracing
 * – function, latency and event tracing
 * – function, latency and event tracing
 * – function, latency and event tracing

'''🔧 TODO. 🚀 advanced features'''
 * – memory leak detector
 * - continues a previous log message in the same line
 * https://git.kernel.org/pub/scm/libs/libtrace/
 * https://git.kernel.org/pub/scm/libs/libtrace/
 * https://git.kernel.org/pub/scm/libs/libtrace/
 * https://git.kernel.org/pub/scm/libs/libtrace/
 * https://git.kernel.org/pub/scm/libs/libtrace/
 * https://git.kernel.org/pub/scm/libs/libtrace/
 * https://git.kernel.org/pub/scm/libs/libtrace/

kgdb and kdb
⚲ Interfaces

⚙ Internals

📚 References
 * – Analyze Linux crash dump data or a live system
 * – Analyze Linux crash dump data or a live system
 * – Analyze Linux crash dump data or a live system
 * – Analyze Linux crash dump data or a live system

⚲ API:

📖 References

📚 Further reading
 * Linux Extended BPF (eBPF) Tracing Tools
 * bpftrace – High-level tracing language for Linux eBPF
 * BCC – Tools for BPF-based Linux IO analysis, networking, monitoring, and more
 * Example of trace.py
 * eBPF Programming for Linux Kernel Tracing
 * eBPF Programming for Linux Kernel Tracing
 * eBPF Programming for Linux Kernel Tracing

📖 References for debugging

📚 Further reading
 * https://drgn.readthedocs.io/ – programmable debugger
 * https://crash-utility.github.io/
 * https://wiki.ubuntu.com/Kernel/Debugging
 * Linux Applications Debugging Techniques

title: The Linux Kernel/Debugging


text:
User talk:Clifford chisapi8

Welcome!
Welcome, Clifford chisapi8!

If you have any questions, you can ask in the assistance reading room or possibly contact me personally. —Justin ( koavf ) ❤T☮C☺M☯ 18:29, 16 November 2023 (UTC)

title: User talk:Clifford chisapi8


text:
Talk:Muggles' Guide to Harry Potter/Books/Order of the Phoenix/Chapter 38

I want whole book please
whole book please Makwan 2345 (discuss • contribs) 19:30, 16 November 2023 (UTC)


text:
User talk:Barshaban

A page you recently created, Beyond Bits And Bytes : A History Of Technological Marvels, has been deleted. Please do not create advertising on Wikibooks. Please see Using Wikibooks to learn more about this project.--Xania   talk 05:51, 17 November 2023 (UTC)

title: User talk:Barshaban


text:
MediaWiki:Community

Community

title: MediaWiki:Community


text:
MediaWiki:Sister projects

Sister projects

title: MediaWiki:Sister projects


text:
Chatbots For Social Change/Jan Voelkel

 * My thought process after this talk...

Belief Change Megastudy (Jan Voelkel et al. 2023)
The paper presents a comprehensive analysis based on a large-scale study (n=32,059) exploring strategies to reduce partisan animosity and anti-democratic attitudes in the United States.

Key Findings

 * Partisan Animosity Reduction: The study found that interventions emphasizing sympathetic individuals with different political beliefs or highlighting common cross-partisan identities were highly effective in reducing partisan animosity.
 * Impact on Anti-Democratic Attitudes: Interventions aimed at correcting misperceptions about outpartisans' views significantly decreased support for undemocratic practices and partisan violence.
 * Effective Strategies for Partisan Animosity: Strategies involving relatable, sympathetic outpartisans and common identities across parties showed the highest effectiveness.
 * Effective Strategies for Undemocratic Practices and Partisan Violence: Interventions correcting exaggerated stereotypes of other party supporters and highlighting the consequences of democratic collapse were effective. Additionally, showing endorsements of democratic principles by political elites also yielded positive results.

Psychological Dimensions of Political Attitudes
 * The study reveals that partisan animosity and support for undemocratic practices/partisan violence are distinct dimensions, necessitating tailored approaches for interventions.

Characteristics of Effective Interventions
 * Explicitly addressing partisan animosity and undemocratic practices in interventions proved more effective.
 * Multifactorial interventions, which employed multiple theoretical mechanisms, were generally more effective than unifactorial ones.
 * Higher production quality and engaging content also contributed to the effectiveness of interventions.

Broader Applications
 * The findings offer insights for applications on websites and social media platforms to address partisan division and anti-democratic attitudes.
 * The study provides a foundation for future research and the development of interventions aimed at strengthening democratic attitudes in the U.S.

These insights provide valuable approaches for addressing the growing partisan divide and threats to democratic principles in America.

Implications
The findings from the "Megastudy identifying effective interventions to strengthen Americans’ democratic attitudes" offer profound implications for the logistics, utility, and impact of chatbots in fostering intelligent social action:

 * Empathy and Understanding in Chatbots: The success of interventions that highlight sympathetic individuals with different political beliefs underscores the importance of empathy and understanding in chatbots. Chatbots, equipped with NLU and LLMs like ChatGPT, can be programmed to represent diverse perspectives and facilitate conversations that foster empathy among users. They can simulate dialogues where users experience differing viewpoints, helping to reduce partisan animosity.

 * Correcting Misperceptions through Information: The effectiveness of interventions aimed at correcting misperceptions about outpartisans’ views highlights a crucial role for chatbots. They can serve as fact-checkers and sources of unbiased information, addressing false beliefs and stereotypes in real-time during conversations. This function is particularly vital in reducing support for undemocratic practices and partisan violence.

 * Tailored Intervention Strategies: Recognizing the distinct dimensions of partisan animosity and support for undemocratic practices, chatbots can be designed to deliver tailored interventions. They can adapt their responses based on the user’s attitudes, providing more personalized and effective engagement.

 * Multifactorial Intervention and Engagement: The success of multifactorial interventions suggests that chatbots should integrate various strategies – such as providing information, simulating empathetic conversations, and highlighting commonalities – to be more effective. Additionally, engaging content and high production quality are crucial for chatbot interfaces to ensure user retention and effective communication.

 * Broader Social Impact: Chatbots have the potential to be deployed on a large scale across various platforms, including social media and websites. They can serve as tools for reducing partisan division and strengthening democratic attitudes, reaching a wide audience and facilitating social change.

 * Continuous Learning and Improvement: Given the rapidly evolving nature of social attitudes and political dynamics, chatbots must be equipped with learning algorithms to continually update their strategies and information. This adaptability ensures they remain effective and relevant.

 * Ethical Considerations and Responsibility: The deployment of chatbots for social change must be guided by ethical considerations, ensuring they promote healthy democratic values and do not reinforce biases or misinformation. Responsible design and deployment are key to maximizing their positive impact.

In summary, the insights from the megastudy offer valuable guidance for the development of chatbots as tools for social change. By leveraging NLU and LLM capabilities, chatbots can be powerful allies in reducing partisan animosity, correcting misperceptions, and fostering a more empathetic and informed society.

title: Chatbots For Social Change/Jan Voelkel


text:
Chatbots For Social Change/Jan Voelkel/thoughts

= Language Model Simulations for Understanding Belief Systems =

Language models (LMs), particularly advanced systems like ChatGPT, have the potential to simulate human-like conversations and argumentation. Recent research, such as that by Ashwini Ashokkumar, suggests that simulated interventions can impact these models similarly to humans, albeit with reduced variance. This concept can be extended to simulate complex argumentation processes to understand and potentially influence belief systems.

The ability to find factual and convincing evidence is exactly what's needed to build consensus, and to amplify convincing disagreements, no matter how small the population is who is dissenting. The chatbot can mediate by always assessing the extent to which it itself is convinced (or can not be dissuaded).

Concept Overview
The idea is to use LMs to simulate the interactions between different viewpoints or belief systems, akin to how AlphaGo improves at the game of Go by playing against itself. This involves the LM arguing from the perspective of a given person, critiquing and analyzing the resources presented by another, and then assessing whether and how its 'mind' is changed.

In this envisioned framework, the LLM would take on the role of different individuals, each with their unique set of beliefs, knowledge, and experiences. It would engage in discussions, critically analyzing and responding to the resources and arguments presented by another person or another simulated persona within the LLM. The key aspect of this interaction is the LLM's ability to argue and critique in good faith, mirroring the complexities of human belief systems and thought processes.

The process involves measuring whether and how the LLM changes its stance based on the arguments presented. This measurement isn't just about tracking shifts in opinion but understanding the underlying reasons for such shifts. What kind of evidence or reasoning does it find compelling? How does it balance conflicting pieces of information? The LLM, in this case, serves as a barometer for the strength and persuasiveness of arguments.

One critical application of this concept is in building consensus and amplifying convincing disagreements, especially within small or marginalized populations. By simulating a diverse range of perspectives and arguments, the LLM can identify which points are most likely to resonate across different belief systems. This approach can highlight common grounds and areas of agreement that might be less apparent in standard discussions.

Furthermore, the chatbot can act as a mediator, continually assessing the extent to which it is convinced by the arguments presented. This continuous evaluation helps in identifying biases, fallacies, or strong points in the arguments. The LLM’s mediation isn't about taking sides but about understanding the effectiveness of different arguments and the dynamics of belief change.

Technical Aspects

 * Neural Retrieval: The LM utilizes advanced neural retrieval techniques to access a wide range of information and perspectives, facilitating a comprehensive understanding of various argumentative strategies.
 * Simulation Dynamics: The LM engages in simulated dialogues, where it adopts different personas, each representing distinct belief systems. This is analogous to a self-play mechanism in AI systems like AlphaGo.

Applications
The potential applications of this technology are broad, including:
 * Conflict Resolution: By understanding the most effective arguments, LMs can aid in resolving conflicts by finding common ground.
 * Education: These simulations can be used to teach critical thinking and argument analysis.
 * Sociopolitical Understanding: Simulations could help in understanding the dynamics of belief formation and change in society.

Ethical Considerations
While the concept is promising, it also raises significant ethical questions regarding manipulation, privacy, and the potential misuse of such technology. Ensuring responsible use is paramount.

Future Directions
Further research is needed to enhance the capabilities of LMs in this domain, especially in terms of accurately simulating individual belief systems and ensuring ethical application of this technology.


text:
User talk:Shadestar474

—Kittycataclysm (discuss • contribs) 03:39, 18 November 2023 (UTC)

Advertising policy
Hello! I am new to Wikibooks; I have only edited on the English Wikipedia. I just made my first edit here. (forgot to log in if you’re wondering why it’s not in my contribs) I was wondering if Wikibooks has an anti-advertising policy like Wikipedia’s. I don’t know what the Wikibooks equivalent to the Teahouse is, which is why I am posting this on my own talk page.

Thanks, Shadestar474 (discuss • contribs) 01:03, 18 November 2023 (UTC)

title: User talk:Shadestar474


text:
User:Shadestar474

Hello! My name is Shadestar474, and I am from the English Wikipedia, but I very occasionally edit here, too. My interests include cats, anime, video games(especially Minecraft), food and drink, history of the Celtic peoples, fashion, music, and reading! I appreciate any help because I am very much a newcomer here.

title: User:Shadestar474


text:
Algebra/Chapter 3/Absolute Value Equations

Introduction
You might have learned about absolute value before. Absolute value is defined such that:
 * $$|a| = \begin{cases} a, & \mbox{if } a \ge 0  \\ -a,  & \mbox{if } a < 0. \end{cases} $$

More simply, it can be defined as the distance between a number and zero on the real number line. Absolute value is written as |a|. So, |-3| is the absolute value of -3, which is 3. Variables, however, are unknown, so absolute value equations should have two possible solutions. In an equation such as |x + 4| = 25, the equation would hold if x + 4 was positive, negative or zero, so to solve that equation, two should be written down first; x + 4 = 25 or x + 4 = -25, with one equation turning the side of the equation without the absolute value into its opposite. From there, you should solve the two equations as you would any equation with variables. You only need to subtract 4 from both equations to get the solution: x = 21 or x = -29. In absolute value equations, the absolute value must be isolated, like you would a variable. In an equation such as 4|x - 7| + 9 = 21, first subtract 9 and divide by 4.


text:
User talk:5.150.97.204

dominant number: incomplete sentence
Hi. I am trying to make sense of a line from Non-Programmer's Tutorial for Python 3/For Loops. The line says:

The range function returns an iterable. This can be converted into a list with the  function. which will then be the dominant number.

I am fairly new to Python, but that last sentence fragment doesn't make any sense to me.

This change was made 18 May 2015 by Special:Contributions/5.150.97.204

Can anyone clarify, please? Thanks. Randy.dunlap (discuss • contribs) 06:19, 18 November 2023 (UTC)

title: User talk:5.150.97.204


text:
User:Dom walden/Multivariate Analytic Combinatorics

Chapters

 * Bivariate Generating Functions
 * Basics
 * Cauchy-Hadamard Theorem and Exponential Bounds
 * Smooth Point via Surgery
 * Smooth Point via Residue Forms
 * Multiple Point
 * Cone Point