Allien Intelligence Lecture reading response

The intersection of AI and architecture, as discussed in Neil Leach’s lecture, is both fascinating and challenging. From my perspective, the integration of AI into architecture heralds a significant shift in how we approach design and construction. AI’s ability to process vast amounts of data and generate innovative designs can lead to more efficient, sustainable, and aesthetically unique buildings. This could revolutionize the field, making architecture more accessible and adaptable to changing needs.

However, the lecture also touches on a critical concern: the potential impact of AI on employment within the architecture industry. As AI becomes more capable, it could potentially reduce the demand for traditional architectural roles, echoing broader concerns about AI’s impact on employment across various sectors. This raises important questions about the future of professional training and the evolving role of architects in a world where AI plays a central role in design processes.

The ethical considerations of AI in architecture, particularly regarding data privacy and the biases inherent in AI algorithms, are also crucial. As AI systems often learn from existing data, there’s a risk of perpetuating historical biases in design choices or urban planning.

While AI undoubtedly offers exciting opportunities for innovation in architecture, it also necessitates a careful consideration of its broader social, ethical, and professional implications. It’s crucial for architects and industry professionals to engage actively with these emerging technologies, shaping their development in a way that maximizes their benefits while mitigating potential drawbacks.

Lecture relfection

In his talk, Neil Leach spoke about the rise of AI prevalence in the last 100 ears, with emphasis on the rapid, borderline uncontrollable, rate of research and breakthroughs being put out. What stood out to me the most was his fear surrounding the lack of concern for safety measures in the field. I too share his sentiments, as I’ve always been interested in AI safety, particularly AI Governance, which is the establishment of policies, regulations, and ethical frameworks to guide the development, deployment, and use of AI. Governments need technical personal that are savvy in this new field in order to establish fair laws in ‘wild west’ era of AI research. We need regulations, just like any other aspects of society are regulated to maintain order. Some objectives would be to establish ethical principles, ensure transparency, protecting data privacy, maintaining security, and establishing accountability.

Alien Intelligence by Prof. Neil – Reflection

“AI cannot think.”

“There is nothing creative about creativity.”

“Magic does not exist.”

These statements from Prof. Neil’s talk stuck with me today. They prompted a deep reflection on the intricate definitions of thinking, creativity, and design.

Geoffrey Hinton’s claim about an AI making a deductive assumption, suggesting a form of thinking, raised intriguing questions about the nature of cognition. As humans, we too often deduce thoughts based on assumptions. So how is our thinking different from that of an AI model? Aren’t humans also analysing everyday information and using deductive reasoning to think and take action? Professor Neil’s subsequent response that there are different forms of thinking emphasised the complexity of the matter. The dichotomy between AI’s deductive reasoning and Professor Neil’s claim that AI cannot truly “think” highlights the ambiguity in defining thinking itself.

The discourse extended to questions about creativity and design, challenging conventional beliefs. This reflection led me to ponder whether our apprehensions about AI stem from a lack of clarity in understanding these fundamental human attributes. What if AI can help us understand our own selves better? As Prof. Neil said, “Humans are not good at everything. We are really good at discriminating, not generating.” So, maybe AI can help with that? Instead of fearing its potential, maybe a paradigm shift is needed towards harnessing AI as a tool for amplifying human cognitive capacities. The lecture prompted a re-evaluation of our conceptual frameworks, urging me to embrace a more nuanced understanding of the dynamic relationship between AI and human cognition, hinting on a more symbiotic relationship for co-existence.

Lecture Reflection

Yesterday we attended a lecture by professor Neil Leach who talked about AI intelligence, its effect and progression on humanity, as well as the future that we should expect with its expansion. Something that I found really interesting was the quote that said “what we know how to do, machines will do better than us” because this was a fear that’s been nestled within my mind especially with the growing loss of job availabilities for young adults from our generation. While we only have ourselves to blame, — after all, we are the creators of machines and AI in the first place — it’s also important to remember that we won’t be “outdated” or “useless” because I’m a firm believer in the thought that there will always be a characteristic, skill, or an idea that can only be generated from a human. Overall, it was a really interesting lecture that helped me reflect on technology and our relationship on a day-to-day basis and what to be mindful of when utilizing these technological resources.

Lecture Reflection

The talk made me think about how AI is not inherently good or bad. The dark side of AI only comes from its capabilities and probably doesn’t realise what bad it is doing. It also makes me think about the way AI thinks, whether AI is conscious or if it does think for itself the way we do or metaphorically.

AI is always seen as more to do with actual knowledge but we can also apply AI capabilities towards design and our future cities. A lot of AI is already in use even before ChatGPT but it’s just ‘invisible’ and I think more people need to understand the spectrum of AI.

Neil also talks about how with current AI such as self driving cars, humans won’t care about driving and I think that links with the idea that humans are inherently lazy and selfish. 

I think this lecture just made me realise that more than ever before, professionals across multiple disciplines need to start working together to learn how to live with this new intelligence.  

Alien Intelligence Talk Reflection – Abdelrahman Mallasi

In a future where AI replaces various occupations, it pushes us to shift our focus from capitalistic, economically-driven values to our inherent human qualities.  This shift places greater emphasis on interpersonal and soft skills than technical abilities that are likely to be automated. This leads to an existential question: How will we define our identities in the absence of conventional professions? We may end up needing to seek alternative methods to derive a sense of achievement and intelligence, or maybe reassess our dependence on such emotions for happiness. Ultimately, as Professor Leach mentioned, AI can act as a mirror to understand humans.

 

Assignment Week #9 – Flocking Simulation with Obstacle Avoidance

Concept:

In this project, I aimed to create an immersive simulation that showcases the collective behavior of a group of boids, as they navigate through an environment that can be filled with obstacles. The focus was to mimic the natural flocking behavior observed in birds or fish, incorporating obstacle avoidance to enhance the realism of their movement.

Implementation:

  • Boid Behavior: Each boid follows three primary rules – alignment, cohesion, and separation – to simulate natural flocking behavior.
  • Dynamic Interaction: Boids react to user input, moving towards the mouse pointer when a specific key is pressed. Pressing ‘a’ makes the boids get attracted toward the cursor. In addition, when clicking on two points on the canvas, it spawns a line that acts as an obstacle for the boids.
  • Obstacle Avoidance: Boids dynamically detect and steer clear of line obstacles in their environment, enhancing the realism of their movement patterns.
  • Visual Aesthetics: The boids change colors dynamically, creating a visually captivating display that reflects their speed and movement.

Sketch:

 

Code:

display() {
  // Calculate the size based on velocity
  let speed = this.velocity.mag();
  let size = map(speed, 0, this.maxSpeed, 2, 10); // Map speed to a reasonable size range

  // Calculate hue for color
  let time = millis() / 1000;
  let timeFactor = (sin(time + this.color) + 1) / 2;
  let velFactor = speed / this.maxSpeed;
  let hue = (this.color + 360 * timeFactor + 180 * velFactor) % 360;

  // Set color and size
  colorMode(HSB, 360, 100, 100);
  stroke(hue, 80, 90);
  strokeWeight(size);

  // Draw the boid
  push();
  translate(this.position.x, this.position.y);
  point(0, 0);
  pop();

  colorMode(RGB, 255);
}
  • The steering forces that direct the boids’ movement towards alignment, cohesion, and separation as well as additional forces for obstacle avoidance and attraction towards the mouse pointer.
avoidObstacles(obstacles) {
  let steer = createVector(0, 0);
  let count = 0;
  let safeDistance = 30; // Increase safe distance for early avoidance

  obstacles.forEach(obstacle => {
    let closestPoint = this.closestPointOnLine(this.position, obstacle.start, obstacle.end);
    let d = p5.Vector.dist(this.position, closestPoint);

    if (d < safeDistance) {
      let diff = p5.Vector.sub(this.position, closestPoint);
      diff.normalize();
      diff.div(d); // Stronger weighting by distance
      steer.add(diff);
      count++;
    }
  });

  if (count > 0) {
    steer.div(count);
    steer.setMag(this.maxSpeed * 1.5); // Increase the magnitude of the steering force
    steer.sub(this.velocity);
    steer.limit(this.maxForce * 1.5); // Increase the maximum force limit
  }

  return steer;
}
  • Obstacles are represented as lines, and a specialized algorithm calculates the closest point on these lines to each boid, triggering avoidance maneuvers.

Challenges:

  • Obstacle Avoidance Algorithm: Crafting an effective method for boids to avoid line-shaped obstacles requires careful consideration of the forces required to allow the boids to avoid obstacles properly.

Future Improvements:

  • Enhanced User Interaction: Exploring more complex user interactions, such as allowing users to create and modify obstacles in real time. making the obstacles possibly move or experience forces.
  • Environmental Complexity: Adding more environmental elements like varying wind currents or areas of attraction and repulsion could create more dynamic scenarios for the boids.

Coding Assignment #9 – Nematodes

Concept & Inspiration:

For this week’s assignment, I tried to recreate a microscopic view of nematodes (parasitic species that feed on plants and are found in soil environments) using flocking behaviors (alignment, cohesion, separation). Nematodes have smooth unsegmented bodies similar to worms, as shown in the following picture:

View post on imgur.com

In the sketch, there is a circle in the middle representing the view from the microscope oculars (eyepieces), and starts with a smooth fade in animation as if the light of the microscope was turned on.

View post on imgur.com

Sketch:

Code Walkthrough:

https://editor.p5js.org/bdr/sketches/n0c4DAM2S

Nematode (vehicle) Class:

Flocking – Separation: to cause nematodes to steer away from all the others.

separate() {
    let desiredSeparation = 25;
    let steer = createVector(0, 0);
    let count = 0;

    for (let i = 0; i < Nematodes.length; i++) {
      let d = p5.Vector.dist(this.position, Nematodes[i].position);
      if (d > 0 && d < desiredSeparation) {
        let diff = p5.Vector.sub(this.position, Nematodes[i].position);
        diff.normalize();
        diff.div(d);
        steer.add(diff);
        count++;
      }
    }

    if (count > 0) {
      steer.div(count);
    }

    if (steer.mag() > 0) {
      steer.normalize();
      steer.mult(this.maxspeed);
      steer.sub(this.velocity);
      steer.limit(this.maxforce);
    }
    return steer;
  }

Flocking – Cohesion: to cause nematodes to steer towards the center of mass – the average position of the nematodes within the circle.

// Flocking - Cohesion
  cohere() {
    let neighborDistance = 50;
    let sum = createVector(0, 0);
    let count = 0;

    for (let i = 0; i < Nematodes.length; i++) {
      let d = p5.Vector.dist(this.position, Nematodes[i].position);
      if (d > 0 && d < neighborDistance) {
        sum.add(Nematodes[i].position);
        count++;
      }
    }

    if (count > 0) {
      sum.div(count);
      return this.seek(sum);
    } else {
      return createVector(0, 0);
    }
  }

Flocking – Alignment: to cause the nematodes to line up with others close by.

align() {
    let neighborDistance = 40;
    let sum = createVector(0, 0);
    let count = 0;

    for (let i = 0; i < Nematodes.length; i++) {
      let d = p5.Vector.dist(this.position, Nematodes[i].position);
      if (d > 0 && d < neighborDistance) {
        sum.add(Nematodes[i].velocity);
        count++;
      }
    }

    if (count > 0) {
      sum.div(count);
      sum.normalize();
      sum.mult(this.maxspeed);
      let steer = p5.Vector.sub(sum, this.velocity);
      steer.limit(this.maxforce);
      return steer;
    } else {
      return createVector(0, 0);
    }
  }

Trail: FrameRate animation: To get a smooth animation, I used frame rates.

frameRate(30)
// Add a trail
if (frameCount % 20 == 0) {
  fill(160, 160, 45, 15);
}
ellipse(width/2, height/2, 440, 440);
Improvements:

One of the next steps would be to add user interactions using the mouse, i.e. creating an obstacle when the user clicks within the bounds of the circle, add food to the nematodes to consume that would help increase their speed/behavior…

Coding Assignment Week #9 – Biology Much?

INSPIRATION & CONCEPT

I have been exploring a lot of physics and math, haven’t I? So I wanted to explore biology for this assignment, something way beyond my comfort zone… But thankfully I do not need to know biology for that, only coding!

So, I have often been fascinated with cells and tissues and those diagrams were few of my favourites to draw in school. I also researched a bit more into molecular biology and viewed some designs / images for more perspective. Then, I tried to model these through code using the flocking simulation as the base – yes!

The main idea or intention behind my work this week was to create patterns and designs using the flocking that do not intrinsically look like the behaviour of the flocking system. And I guess I was successful in that to some extent 🙂 I am very happy with my work.

Mood Board

THE PROCESS

As one can see in the above images, circular objects almost appear everywhere. Even in the neuron-like strands, one can htink of those strands either avoiding or circling around certain points. Hence, I started with adding a bunch of circles with random radii, which I called holes, to the canvas. The logic of the code is that the flocking system tries to avoid or circle around these circles to create desired results.

I started by writing a hole class as follows:

class Hole {
  
  constructor(x, y, r) {
    this.pos = createVector(x, y);
    this.r = r;
  }
  
  show() {
    push();
    noFill();
    circle(this.pos.x, this.pos.y, this.r*2);
    pop();
  }
}

and then creating the hole objects which are passed to the flocking system. Each boid tries to avoid this circle using a custom avoid() method I write inspired by our evade() and flee() methods.

let holes = [];

// make holes for neurons
for (let i = 0; i < 10; i++) {
    holes.push(new Hole(random(width), random(height), random(20,80)));
}

for (let i = 0; i < holes.length; i ++) {
    holes[i].show();
    flock.avoid(holes[i]);
}

The avoid method is as follows:

// in the flock.js class
avoid(hole) {
    for (let boid of this.boids) {
      // let obstacle = createVector(width/2, height/2);
      let d = p5.Vector.dist(boid.position, hole.pos);
      if (d > 0 && d < hole.r) {
        boid.avoid(hole); 
      }
    }
}

// in the boid.js class
avoid(hole) {
    let desired = p5.Vector.sub(this.position, hole.pos);
    desired.setMag(this.maxspeed);
    // Steering = Desired minus velocity
    let steer = p5.Vector.sub(desired, this.velocity);
    steer.mult(this.maxforce); // Limit to maximum steering force
    this.applyForce(steer);  
}

THE SKETCHES

As you can see above, the boids try to avoid the the circles and flee away from it.

Then I further played around with values and fine-tuned the parameters to achieve varying results.

A bit of a honey-comb effect:

To create certain knots at places, I also decided to add a few holes that would be attractors. I added more weight to this so it would attract more than the holes taht repel. This creates a very different kind of design – something that one would see though a microscope.

OUTPUT

All my lovely outputs of the code above can be seen in the below gallery!! Hope you all like them 🙂

FURTHER DEVELOPMENT

Try creating patterns with different kinds of shapes – thin rectangles, triangles and polygons to try and mimic other kinds of tissues and cells. One of the patterns that I really want to try and did not achieve in this attempt is the neurological one, neurons vein like here and there (the last 3 in my inspiration gallery). They would require some other kind of factors to attract and diffuse in a line kind if format and that is something I would like to try out in the future.

Scurrying Ants – Week 9

Inspiration

For my inspiration this week, I wanted to replicate the ants that always scurry around with each other and sometimes if they find food or something they want, they tend to move in a herd.

I first had the images on the background to represent dirt in some way and to have the ant image.

After the graphics aspect was done, I wanted to implement the actual motion and have the ants be represented as circles for now. I needed to work on two particular functions, separate and align.

For the separate function, I needed to create a vector and have the separation movement be coded within that vector.

separate(ants) {
    let steer = createVector();
    let count = 0;
    for (let other of ants) {
      let d = dist(
        this.pos.x,
        this.pos.y,
        other.pos.x,
        other.pos.y
      );
      if (other != this && d < this.desiredSeparation) //make sure the ant is not comparing with isteld and within certain distance
      {
        let diff = p5.Vector.sub(this.pos, other.pos);
        diff.normalize();
        diff.div(d);
        steer.add(diff);
        count++;
      }
    }
    if (count > 0) {
      steer.div(count);
    }
    if (steer.mag() > 0) {
      steer.setMag(this.maxSpeed);
      steer.sub(this.vel);
      steer.limit(this.maxForce);
    }
    return steer;
  }

For the align function, it is the same structure as the separate function ,but we use addition instead of subtraction.

align(ants) {
    let sum = createVector();
    let count = 0;
    let perceptionRadius = 50;

    for (let other of ants) {
      let d = dist(
        this.pos.x,
        this.pos.y,
        other.pos.x,
        other.pos.y
      );

      if (other !== this && d < perceptionRadius) {
        sum.add(other.vel);
        count++;
      }
    }

    if (count > 0) {
      sum.div(count);
      sum.setMag(this.maxSpeed);
      let steer = p5.Vector.sub(sum, this.vel);
      steer.limit(this.maxForce);
      return steer;
    } else {
      return createVector();
    }
  }

This was the output with circles and I wanted the head of my ant to always point the way in the direction it was going.

display() {
   push();
   translate(this.pos.x, this.pos.y);
   rotate(this.vel.heading());
   image(this.img, 0, 0, 15, 15);
   pop();
   // circle(this.pos.x, this.pos.y, 10);
 }

This is my final output and I would want to add more interactivity next time by making the user have something ‘sweet’ as the mouse movement, so the ants move towards the mouse.