Pages

Saturday, July 3, 2021

Validation vs. Verification in Software Engineering

 The distinction between the two terms is largely to do with the role of specifications.  


Validation is the process of checking whether the specification captures the customer's needs. 

 

Verification is the process of checking that the software meets the specification.

The zip function in Python, C++, JavaScript, and Haskell

Your complete guide to the printf function

 

Intelligent Agents

 

  • An agent can be viewed as anything perceiving its environment through sensors and acting upon it through actuators. 

  • Mathematically speaking, the agent's behavior is described by the agent function. 

  • Internally, the agent function for an artificial agent will be implemented by the agent program. 

  • For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has.  

  • An omniscient agent knows the actual outcome of its actions and can act accordingly, but omniscience is impossible in reality. 

  • To the extent that the agent relies on the prior knowledge of its designer rather than its percepts we say that the agent lacks autonomy. 

  • If an agent's sensors give it a complete access over the state of the environment at each point in time, we say the task environment is fully observable. 

  • If the next state of the environment is completely determined by the current state and the action executed by the agent we say the environment is deterministic, otherwise it is stochastic. 

  • In an episodic task environment, the agent's experience is divided into atomic episodes. In each episode the agent receives a percept and then performs a single action. 

  • If the environment can change while an agent is deliberating, the environment is dynamic, otherwise it is static. 

  • In a known environment, the outcomes for all actions are given. 

  • Agent = architecture + program 

  • 4 kinds of agent programs: 

    • Simple reflex agents 

    • Model-based reflex agents 

    • Goal-based agent 

    • Utility-based agents 

  • Simple reflex agents select actions on the basis of the current percept, ignoring the rest of the percept history. 

  • Model-based reflex agents maintain some sort of internal state that depends on the percept history. 

  • A general learning agent consists of a critic, a learning element, a performance element, and a problem generator.

What is Artificial Intelligence?

 

  • A system is rational if it does the 'right thing', given what it knows. 

  • In terms of thinking humanly, AI is the automation of the activities we associate with human thinking, such as decision making, problem solving and learning. 

  • In terms of thinking rationally, AI is the study of the computations that make it possible to perceive, reason, and act. 

  • In terms of acting humanly, AI is the study of how to make computers do things at which, at the moment, people are better at. 

  • In terms of acting rationally, AI is the study of the design of intelligent agents. 

  • The Turing test was designed to provide a satisfactory operational definition of intelligence. A computer passes the test if a human interrogator after posing some written questions cannot tell from the responses whether it is a human or a computer. 

  • Total Turing test includes a videos signal, in order to test the subjects' perceptual abilities. 

  • A rational agent is one that acts to achieve the best outcome or, when there is uncertainty, the best expected outcome.

Bit rate vs. Baud rate

Bit rate: The transmission of number of bits per second. 

Baud rate: The number of signal units per second. 

Bit rate = Baud rate * number of bits per baud 

 In digital systems 1 Bd = 1 bit/sec.  

The symbol duration time Ts:

  Can be measured as the time between the transitions in an eye diagram of the signal in an oscilloscope. 

Ts = 1 / fs, Fs is the symbol rate.

A common measure of the symbol rate is the baud (Bd). 

 Communication at the baud rate 1000 Bd, means communication by sending 1000 symbols per second. 

For a modem: This corresponds to sending 1000 tones per second. 

For a line code: This corresponds to 1000 pulses per second.

Tuesday, August 27, 2019

Inline Assembly


Below is an example of inline assembly in C++. Notice that it is x86 assembly with the AT&T syntax. The final value of b is 10.