Artificial Intelligence Search Algorithms and Agent Fundamentals
AI Agents and Architecture
Agents perceive their environment using sensors and act rationally upon that environment using effectors.
Agent Architecture
Agent → Actions (with effectors) → Environment → Percepts → Agent
Key Agent Features
- Situatness: The agent’s direct connection to its environment through percepts and effectors.
- Autonomy: The agent acts without intervention by humans or other agents. (Preprogramming does not count.)
- Adaptivity: The ability to react flexibly to changes in its environment.
Wireless Communication Protocols and Mobile Network Architecture
Wireless Application Protocol (WAP) Fundamentals
WAP (Wireless Application Protocol) is a set of protocols designed for wireless devices (like mobile phones and PDAs) to access internet services. It uses a client-server model, with the mobile device acting as the client and a WAP gateway/web server as the server. WAP optimizes content for low bandwidth, small screens, and limited processing power.
WAP Protocol Stack Layers
The WAP model is structured into several distinct layers:
- Application Layer:
Digital Modulation Techniques in Python: Pulse Shaping and QPSK
import numpy as np
T = 1 #time period
Fs = 100 #sampling frequency
t = np.
arange(-3*T, 3*T, 1/Fs)
g = lambda t: np.Sinc(t) * np.Cos(np.Pi*0.5*t) / (1-(2*0.5*t)**2) #Defining a lambda function g(t) that represents a raised cosine filter with a roll-off factor of 0.5.
plt.
Figure(figsize=(8,3))
plt.Plot(t, g(t))
binary_sequence = np.Array(np.Random.Randint(2,size=50))
d = 2 * np.Array(binary_sequence) – 1 #making the binary sequence NRZ
def get_signal(d): #to get transmitted signal
t = np.Arange(-2*T,
Read MoreImplementing Core Machine Learning Algorithms in Python
1. Perceptron Algorithm Implementation
The Perceptron is a foundational linear classification algorithm. This implementation uses NumPy for efficient vector operations.
Perceptron Class Definition
import numpy as np, random
class Perceptron:
def __init__(self, eta=0.01, n_iter=50, random_state=1):
self.eta, self.n_iter, self.random_state = eta, n_iter, random_state
def fit(self, x, y):
rgen = np.random.RandomState(self.random_state)
self.w_ = rgen.normal(0, 0.01, 1 Read More
Key Techniques in Web Scraping and Text Processing
Web Scraping and Data Extraction
Core Web Technologies
A web page is built using several core technologies:
- HTML (HyperText Markup Language): Defines the content and structure of a web page. It is composed of tags organized in a tree-like structure.
- CSS (Cascading Style Sheets): Controls the design and presentation of a web page.
- JavaScript: Enables interactive actions and dynamic content on a web page.
Scraping Methods
Static Web Page Scraping
For static pages, you can use libraries like Beautiful Soup
Read MoreJava Array Fundamentals: Syntax, Indexing, and Code Examples
Java Array Fundamentals: Core Concepts and Syntax
Array Properties and Declaration
Fixed Size Property
Once an array is created, its size is fixed.
Valid Array Declarations (int values)
Which of the following are correct ways to declare an array of int values?
int[] a;int a[];
Valid Array Declarations (Mixed Types)
Which of the following statements are valid?
double d[] = new double[30];int[] i = {3, 4, 3, 2};
Incorrect Array Declarations and Initializations
Which of the following declarations or initializations
Read More