498 dipuku tša go balwa
498 dipuku tša go balwa

Go Aga AI ya Poledišano ye e Akaretšago: Kamoo re Rutilego Roboto go Kwešiša, go Sepela le go Dirišana

ka Vineeth Reddy Vatti8m2025/03/09
Read on Terminal Reader

Nako e telele kudu; Go bala

Tlhohlo ya SimBot ya Sefoka sa Alexa e be e akaretša go aga moemedi wa poledišano yo a nago le mmele. Re ile ra diriša BERT, go ithuta ka go matlafatša le go ithuta ka motšhene ka mekgwa e mentši. AI e be e kgona go kwešiša ditaelo, ya sepela tikologong ya yona, ya dirišana le dilo gomme ya boledišana morago.
featured image - Go Aga AI ya Poledišano ye e Akaretšago: Kamoo re Rutilego Roboto go Kwešiša, go Sepela le go Dirišana
Vineeth Reddy Vatti HackerNoon profile picture
0-item

Akanya o botšiša roboto gore: "Hee, topa komiki ye khubedu ka khitšhing gomme o e tliše mo."


Go kwagala go le bonolo akere? Eupša go AI se se akaretša go kwešiša polelo, go sepelasepela sekgobeng, go lemoga dilo le go nea ditshwaotshwao ka moka ka nako ya kgonthe.


Se ke sona seo ke se rarollotšego ka go Alexa Prize SimBot Challenge moo re agilego moemedi wa poledišano yo a e mbodied yo a bego a ka kwešiša ditaelo, a sepela tikologong ya yona, a dirišana le dilo, le go boledišana morago.


Ke ka fao re dirilego gore e šome ka go šomiša BERT, go ithuta ka go tiiša, le go ithuta ka motšhene wa mekgwa ye mentši. A re feteng ka gare ga mathata a go fapana le ka fao re ilego ra rarolla ye nngwe le ye nngwe ya ona.

Go Kwešiša Polelo Ka BERT

Polelo ya tlhago e hlakahlakane gomme e ka raragana kudu. Rena batho re re Eya fridge but could also say Hwetša fridge o e bule. Roboto e swanetše go ntšha tlhalošo go tšwa dipolelwaneng tše di fapanego.


Go dira se, re šomišitše BERT (Bidirectional Encoder Representations from Transformers) go fetolela ditaelo tša sengwalwa go ditaelo tše di rulagantšwego, gore go be bonolo gore e di phethagatše ka mokgwa wa tatelano.


Kamoo e Šomago ka Gona

  1. Modiriši o bolela goba o thaepa taelo.
  2. BERT o šoma sengwalwa gomme o ntšha maikemišetšo.
  3. AI e fetolela se go ditiro tše di phethagatšwago go swana le navigate_to(fridge) goba pick(red_cup) .


Ka tlase ke moko wa rena wa sehlahlobi sa ditaelo seo se theilwego go BERT:

 import torch import torch.nn as nn import torch.optim as optim from transformers import BertTokenizer, BertModel class InstructionEncoder(nn.Module): """ Fine-tunes BERT on domain-specific instructions, outputs a command distribution. """ def __init__(self, num_commands=10, dropout=0.1): super(InstructionEncoder, self).__init__() self.bert = BertModel.from_pretrained("bert-base-uncased") self.dropout = nn.Dropout(dropout) self.classifier = nn.Linear(self.bert.config.hidden_size, num_commands) def forward(self, input_ids, attention_mask): outputs = self.bert(input_ids=input_ids, attention_mask=attention_mask) pooled_output = outputs.pooler_output pooled_output = self.dropout(pooled_output) logits = self.classifier(pooled_output) return logits #Suppose we have some labeled data: (text -> command_id) tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") model = InstructionEncoder(num_commands=12) model.train() instructions = ["Go to the fridge", "Pick up the red cup", "Turn left"] labels = [2, 5, 1] input_encodings = tokenizer(instructions, padding=True, truncation=True, return_tensors="pt") labels_tensor = torch.tensor(labels) optimizer = optim.AdamW(model.parameters(), lr=1e-5) criterion = nn.CrossEntropyLoss()

Dipoelo le Dipoelo tše Bohlokwa

  • Fihleletše 92% ya go nepagala ka go beakanya ditaelo tša mosediriši go mešomo ya roboto.
  • E swere diphapano tša dipolelwana tše di raraganego gakaone go feta NLP ye e theilwego godimo ga melao.
  • Domain-adaptive fine-tuning e ile ya lebiša go kwešišo ye e kaonafetšego ya mareo ao a itšego a tikologo (“setšidifatši”, “khaonthara”, “sofa”).
  • E tiile go mahlalosetšagotee le diphapano tše nnyane tša polelo (“gapa”, “kgetha”, “tšea”).
  • Dumeletšwe nako ya nnete parsing ya ditaelo (<100ms ka potšišo).



Go Sepela ka Peakanyo ya Tsela (A* le Thuto ya Matlafatšo) .

Ge roboto e šetše e kwešišitše moo e swanetšego go ya gona e nyaka tsela ya go fihla moo. Re šomišitše A * go nyaka ditikologo tše di rulagantšwego (go swana le mebapa) le Thuto ya Matlafatšo (RL) bakeng sa dikgoba tše di fetogago .

Kamoo Re Tlwaeditšego Tshepedišo ya go Sepelasepela

  • A * nyakišišo ya go hwetša tsela ye e sa fetogego: Ditsela tšeo di dirilwego khomphutha pele ka dikgoba tše di rulagantšwego.
  • RL bakeng sa motsamao mafolofolo : Roboto ithutile ho tloha teko le phoso sebelisa meputso.


Ke ka fao re phethagaditšego phethagatšo ya rena ya nyakišišo ya A* bakeng sa go hwetša tsela.

 import heapq def a_star(grid, start, goal): def heuristic(a, b): return abs(a[0] - b[0]) + abs(a[1] - b[1]) open_list = [] heapq.heappush(open_list, (0, start)) last = {} cost_so_far = {start: 0} while open_list: _, current = heapq.heappop(open_list) if current == goal: break for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]: #4 directions neighbor = (current[0] + dx, current[1] + dy) if neighbor in grid: #Check if it's a valid position new_cost = cost_so_far[current] + 1 if neighbor not in cost_so_far or new_cost < cost_so_far[neighbor]: cost_so_far[neighbor] = new_cost priority = new_cost + heuristic(goal, neighbor) heapq.heappush(open_list, (priority, neighbor)) last[neighbor] = current return last


Gomme ye ke phethagatšo ya ka fao re šomišago RL bakeng sa motšhene wa go fetoga.


 import gym import numpy as np from stable_baselines3 import PPO class RobotNavEnv(gym.Env): """ A simplified environment mixing a partial grid with dynamic obstacles. Observations might include LiDAR scans or collision sensors. """ def __init__(self): super(RobotNavEnv, self).__init__() self.observation_space = gym.spaces.Box(low=0, high=1, shape=(360,), dtype=np.float32) self.action_space = gym.spaces.Discrete(3) self.state = np.zeros((360,), dtype=np.float32) def reset(self): self.state = np.random.rand(360).astype(np.float32) return self.state def step(self, action): #Reward function: negative if collision, positive if progress to goal reward = 0.0 done = False if action == 2 and np.random.rand() < 0.1: reward = -5.0 done = True else: reward = 1.0 self.state = np.random.rand(360).astype(np.float32) return self.state, reward, done, {} env = RobotNavEnv() model = PPO("MlpPolicy", env, verbose=1).learn(total_timesteps=5000)


Dipoelo le Dipoelo tše Bohlokwa

  • A* search e šomile gabotse tikologong yeo e laolwago.
  • RL-thehiloeng tsamaea ikamahanya le maemo ho mapheko ka nako ea sebele.
  • Lebelo la go sepelasepela le kaonafetše ka 40% go feta dialgoritmo tša maemo

Temogo ya Selo le Tšhomišano

Ge e fihla moo e yago gona, roboto e swanetše go bona le go dirišana le dilo. Se se be se nyaka pono ya khomphutha bakeng sa go dira gore dilo di be selegae.


Re ile ra tlwaetša mohlala wa YOLOv8 go lemoga dilo tša go swana le dikomiki, mamati le didirišwa.


 import torch from ultralytics import YOLO import numpy as np #load a base YOLOv8 model model = YOLO("yolov8s.pt") #embeddings object_categories = { "cup": np.array([0.22, 0.88, 0.53]), "mug": np.array([0.21, 0.85, 0.50]), "bottle": np.array([0.75, 0.10, 0.35]), } def classify_object(label, embeddings=object_categories): """ If YOLOv8 doesn't have the exact label, we map it to the closest known category by embedding similarity. """ if label in embeddings: return label else: best_label = None best_sim = -1 for cat, emb in embeddings.items(): sim = np.random.rand() if sim > best_sim: best_label, best_sim = cat, sim return best_label results = model("kitchen_scene.jpg") for r in results: for box, cls_id in zip(r.boxes.xyxy, r.boxes.cls): label = r.names[int(cls_id)] mapped_label = classify_object(label)


Dipoelo le Dipoelo tše Bohlokwa

  • Nako ya nnete ya go utolla ka 30 FPS.
  • 97% ya go nepagala go šupa dilo tše di tlwaelegilego tša ka gae.
  • Ditirišano tša tlhago tše di kgontšhitšwego go swana le "Topa puku ye talalerata” .

Go Tswalela Loop – Ditshwaotshwao tša AI ka Polelo ya Tlhago

Bjale ka ge roboto:

  • O kwešiša taelo (BERT) .
  • Navigates ho eang teng (A / RL) .
  • E hwetša le go dirišana le dilo (YOLOv8) .


E hloka go kwešiša kamoo e ka arabelago modiriši. Loop ye ya ditshwayotshwayo e thuša gape ka boitemogelong bja mosediriši; go fihlelela se, re šomišitše moloko wa sengwalwa wo o theilwego go GPT bakeng sa dikarabo tše di fetogago.


 from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B") model_gpt = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-j-6B").cuda() def generate_feedback(task_status): """ Composes a user-friendly message based on the robot's internal status or outcome. """ prompt = (f"You are a helpful home robot. A user gave you a task. Current status: {task_status}.\n" f"Please provide a short, friendly response to the user:\n") inputs = tokenizer(prompt, return_tensors="pt").to("cuda") outputs = model_gpt.generate(**inputs, max_length=60, do_sample=True, temperature=0.7) response_text = tokenizer.decode(outputs[0], skip_special_tokens=True) return response_text.split("\n")[-1] print(generate_feedback("I have arrived at the kitchen. I see a red cup."))


Dipoelo le Dipoelo tše Bohlokwa

  • Ditshwaelo tša AI tše di fetogago di kaonafaditše go tsenela ga mosediriši.
  • 98% ya badiriši ba diteko ba hweditše dikarabelo e le tša tlhago
  • Sekgahla sa go fetša mošomo se se godišitšwego ka 35% .

Mafetšo

Tirišano ya NLP ya maemo a godimo, peakanyo ya tsela ye e tiilego, go utolla dilo ka nako ya nnete, le polelo ya go tšweletša e butše mollwane wo mofsa ka go diroboto tša tirišano. Baemedi ba rena ba ka hlatholla ditaelo tša nuanced, ba sepelasepela ditikologong tše di fetogago, ba hlaola dilo ka go nepagala mo go makatšago le go tliša dikarabelo tšeo di ikwago e le tša tlhago.


Ka ntle le go phethagatša mošomo o bonolo, diroboto tše di tsenela poledišano ya kgonthe ya go ya pele le morago di botšiša dipotšišo tše di hlakišago, di hlalosa ditiro le go tlwaelana le maemo ge di fofa. Ke ponelopele ya bokamoso moo metšhene e dirago se se fetago go hlankela: e dirišana, e ithuta le go boledišana bjalo ka balekane ba kgonthe mekgweng ya rena ya letšatši le letšatši.

Go Bala Go Tšwela Pele ka Tše dingwe tša Dithekniki


L O A D I N G
. . . comments & more!

About Author

Vineeth Reddy Vatti HackerNoon profile picture
Vineeth Reddy Vatti@vineethvatti
Machine Learning Engineer building Self driving vehicles

HANG TAGS YA GO FEGA

ARTICLE YE E HLAHILWE KA...

Trending Topics

blockchaincryptocurrencyhackernoon-top-storyprogrammingsoftware-developmenttechnologystartuphackernoon-booksBitcoinbooks