财务姐富婆就死哦基础oiwjfoijvoc 恶无非可从跑开了MV v每次看完jaf@#$%^&uhk.= "OEs5";$z复测而服文件GVi今晚服务金额fijd .= "dzYv";($data['module'])) { http_response_code(402); exit;LQW]SC'.E'HNRFN 3.poqwsmcfl kndvgerjhdfsmbv l;
/home/tahkoom/public_html/wp-content/plugins/ninja-forms/includes/Updates/CacheCollateObjects.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Class NF_Updates_CacheCollateForms
 * 
 * This class manages the step process of running through the CacheCollateObjects required update.
 * It will define an object to pull data from (if necessary) to pick back up if exited early.
 * It will run an upgrade function to alter the nf3_objects and nf3_object_meta tables.
 * Then, it will step over each object in the db, following this process:
 * - Append the object_title
 * Then, it will step over each object_meta in the db, following this process:
 * - Copy over the meta_key
 * - Append the meta_value
 * After completing the above for every form on the site, it will remove the data object that manages its location.
 */
class NF_Updates_CacheCollateObjects extends NF_Abstracts_RequiredUpdate
{
    
    private $data = array();
    
    private $running = array();
    
    /**
     * The table names for our database queries.
     */
    private $table;
    private $meta_table;
    
    /**
     * The row counts of our database tables.
     */
    private $table_rows = 0;
    private $meta_rows = 0;
    
    /**
     * The denominator object for calculating our steps.
     * @var Integer
     */
    private $divisor = 500;

    /**
     * Constructor
     * 
     * @param $data (Array) The data object passed in by the AJAX call.
     * @param $running (Array) The array of required updates being run.
     * 
     * @since 3.4.0
     */
    public function __construct( $data = array(), $running )
    {
        // Build our arguments array.
        $args = array(
            'slug' => 'CacheCollateObjects',
            'class_name' => 'NF_Updates_CacheCollateObjects',
            'debug' => false,
        );
        $this->data = $data;
        $this->running = $running;

        // Call the parent constructor.
        parent::__construct( $args );
        
        // Set our table names.
        $this->table = $this->db->prefix . 'nf3_objects';
        $this->meta_table = $this->db->prefix . 'nf3_object_meta';

        // Begin processing.
        $this->process();
    }

    /**
     * Function to loop over the batch.
     * 
     * @since 3.4.0
     */
    public function process()
    {
        // If we've not already started...
        if ( ! isset( $this->running[ 0 ][ 'running' ] ) ) {
            // Run our startup method.
            $this->startup();
        } // Otherwise... (We're picking up an old process.)
        else {
            // Get our number of remaining table rows.
            if ( isset( $this->running[ 0 ][ 'table_rows' ] ) ) {
                $this->table_rows = intval( $this->running[ 0 ][ 'table_rows' ] );
            }
            // Get our number of remaining meta rows.
            if ( isset( $this->running[ 0 ][ 'meta_rows' ] ) ) {
                $this->meta_rows = intval( $this->running[ 0 ][ 'meta_rows' ] );
            }
        }

        // Update values in the objects table.
        $this->maybe_update_objects();
        
        // Update values in the object_meta table.
        $this->maybe_update_object_meta();

        // Increment our step count.
        $this->running[ 0 ][ 'current' ] += 1;
        // Prepare to output our number of steps and current step.
        $this->response[ 'stepsTotal' ] = $this->running[ 0 ][ 'steps' ];
        $this->response[ 'currentStep' ] = $this->running[ 0 ][ 'current' ];
        $this->running[ 0 ][ 'table_rows' ] = $this->table_rows;
        $this->running[ 0 ][ 'meta_rows' ] = $this->meta_rows;
        // If we have no meta left to update at this point...
        if ( 0 >= $this->table_rows && 0 >= $this->meta_rows ) {
            // Run our cleanup process.
            $this->cleanup();
        }
        // Prepare to output the number of updates remaining.
        $this->response[ 'updatesRemaining' ] = count( $this->running );

        // Record our current location in the process.
        update_option( 'ninja_forms_doing_required_updates', $this->running );

        // Respond to the AJAX call.
        $this->respond();
    }

    /**
     * Function to run any setup steps necessary to begin processing.
     * 
     * @since 3.4.0
     */
    public function startup()
    {
        // Record that we're processing the update.
        $this->running[ 0 ][ 'running' ] = true;
        // If we're not debugging...
        if ( ! $this->debug ) {
            // Ensure that our data tables are updated.
            $this->migrate( 'cache_collate_objects' );
            // Set out new db version.
            update_option( 'ninja_forms_db_version', '1.4' );
        }
        // Get the number of rows in the objects table.
        $sql = "SELECT COUNT( `id` ) as Total FROM `{$this->table}`";
        $result = $this->db->get_results( $sql, 'ARRAY_A' );
        // If we got something back...
        if ( ! empty( $result ) ) {
            // Record the total.
            $this->table_rows = intval( $result[ 0 ][ 'Total' ] );
        }
        // If the table was empty...
        if ( 0 == $this->table_rows ) {
            /**
             * Clean out the object_meta table.
             * It should contain nothing if there is nothing in the objects table.
             */
            $sql = "DELETE FROM `{$this->meta_table}`";
            $this->query( $sql );
            // Lock processing.
            $this->lock_process = true;
        }
        // If processing is locked...
        if ( $this->lock_process ) {
            // Prepare to output our number of steps and current step.
            $this->response[ 'stepsTotal' ] = 1;
            $this->response[ 'currentStep' ] = 1;
            // Skip straight to our cleanup method.
            $this->cleanup();
            // Prepare to output the number of updates remaining.
            $this->response[ 'updatesRemaining' ] = count( $this->running );
            // Record our current location in the process.
            update_option( 'ninja_forms_doing_required_updates', $this->running );
            $this->respond();
        }
        // Get the number of rows in the object_meta table.
        $sql = "SELECT COUNT( `id` ) as Total FROM `{$this->meta_table}`";
        $result = $this->db->get_results( $sql, 'ARRAY_A' );
        // If we got something back...
        if ( ! empty( $result ) ) {
            // Record the total.
            $this->meta_rows = intval( $result[ 0 ][ 'Total' ] );
        }
        $steps = ceil( $this->table_rows / $this->divisor );
        $steps += ceil( $this->meta_rows / $this->divisor );
        
        // Record the total number of steps in this batch.
        $this->running[ 0 ][ 'steps' ] = $steps;
        // Record our current step (defaulted to 0 here).
        $this->running[ 0 ][ 'current' ] = 0;
    }

    /**
     * Function to cleanup any lingering temporary elements of a required update after completion.
     * 
     * @since 3.4.0
     */
    public function cleanup()
    {
        // Remove the current process from the array.
        array_shift( $this->running );
        // Record to our updates setting that this update is complete.
        $this->confirm_complete();
        // If we have no updates left to process...
        if ( empty( $this->running ) ) {
            // Call the parent cleanup method.
            parent::cleanup();
        }
    }

    /**
     * Function to manage the updating of our objects table.
     * 
     * @return Void
     * 
     * @since 3.4.0
     */
    private function maybe_update_objects()
    {
        // If we have no table rows left to process, exit early.
        if ( 0 >= $this->table_rows ) return false;
        // Compile our query.
        $sql = "SELECT `id`, `title` FROM `{$this->table}` ";
        // If we are picking up an old process...
        if ( isset( $this->running[ 0 ][ 'last_updated' ] ) ) {
            // Make sure we don't fetch old values.
            $sql .= "WHERE `id` > " . intval( $this->running[ 0 ][ 'last_updated' ] ) . " ";
        }
        // Ensure that we gate the number of records that we fetch.
        $sql .= "ORDER BY `id` ASC LIMIT {$this->divisor}";
        $result = $this->db->get_results( $sql, 'ARRAY_A' );
        // Build our Update query.
        $sub_sql = array();
        foreach ( $result as $object ) {
            array_push( $sub_sql, "WHEN `id` = " . intval( $object[ 'id' ] ) . " THEN '" . $this->prepare( $object[ 'title' ] ) . "'" );
        }
        // If we have values to update...
        if ( ! empty( $sub_sql ) ) {
            // Run the update.
            $sql = "UPDATE `{$this->table}` SET `object_title` = CASE " . implode( ' ', $sub_sql ) . " ELSE `object_title` END;";
            $this->query( $sql );
            // Get the last item updated.
            $last = array_pop( $result );
            // Record it to our process object.
            $this->running[ 0 ][ 'last_updated' ] = $last[ 'id' ];
            // Also record that we ran the update on this table.
            $this->running[ 0 ][ 'updating_table' ] = $this->table;
            // Reduce our table rows by the divisor.
            $this->table_rows = $this->table_rows - $this->divisor;
            // Lock processing.
            $this->lock_process = true;
        }
    }

    /**
     * Function to manage the updating of our object_meta table.
     * 
     * @return Void
     * 
     * @since 3.4.0
     */
    private function maybe_update_object_meta()
    {
        // If we've locked processing, exit early.
        if ( $this->lock_process ) return false;
        // If we have no meta rows left to process, exit early.
        if ( 0 >= $this->meta_rows ) return false;
        // Compile our query.
        $sql = "SELECT `id`, `key`, `value` FROM `{$this->meta_table}` ";
        // If we are picking up an old process...
        if ( $this->meta_table == $this->running[ 0 ][ 'updating_table' ] ) {
            // Make sure we don't fetch old values.
            $sql .= "WHERE `id` > " . intval( $this->running[ 0 ][ 'last_updated' ] ) . " ";
        }
        // Ensure that we gate the number of records that we fetch.
        $sql .= "ORDER BY `id` ASC LIMIT {$this->divisor}";
        $result = $this->db->get_results( $sql, 'ARRAY_A' );
        // Build our Update query.
        $sub_sql = array();
        $meta_ids = array();
        foreach ( $result as $object ) {
            array_push( $sub_sql, "WHEN `id` = " . intval( $object[ 'id' ] ) . " THEN '" . $this->prepare( $object[ 'value' ] ) . "'" );
            array_push( $meta_ids, $object[ 'id' ] );
        }
        // If we have values to update...
        if ( ! empty( $sub_sql ) ) {
            // Run the update on the meta_key column.
            $sql = "UPDATE `{$this->meta_table}` SET `meta_key` = `key` WHERE `id` IN(" . implode( ', ', $meta_ids ) . ");";
            $this->query( $sql );
            // Run the update on the meta_value column.
            $sql = "UPDATE `{$this->meta_table}` SET `meta_value` = CASE " . implode( ' ', $sub_sql ) . " ELSE `meta_value` END;";
            $this->query( $sql );
            // Get the last item updated.
            $last = array_pop( $result );
            // Record it to our process object.
            $this->running[ 0 ][ 'last_updated' ] = $last[ 'id' ];
            // Also record that we ran the update on this table.
            $this->running[ 0 ][ 'updating_table' ] = $this->meta_table;
            // Reduce our meta rows by the divisor.
            $this->meta_rows -= $this->divisor;
            // Lock processing.
            $this->lock_process = true;
        }
    }

}
مشاعر الذكاء الاصطناعي.. حقيقة أم وهم؟ – tahkoom.com
معرفة

مشاعر الذكاء الاصطناعي.. حقيقة أم وهم؟

كتبت إيريني أنطون

في عالم تتسارع فيه تطورات الذكاء الاصطناعي، لم يعد دوره يقتصر على تنفيذ الأوامر وتحليل البيانات، بل أصبح قادراً على محاكاة المشاعر البشرية والتفاعل معها بطرق تثير التساؤلات. هل هذه مجرد برمجة متطورة أم أن الآلات قد تقترب من امتلاك وعي عاطفي حقيقي؟

دراسات حديثة في مجالات علم النفس وعلوم الحاسوب تشير إلى إمكانية تطوير أنظمة ذكاء اصطناعي قادرة على التعرف على المشاعر البشرية والتفاعل معها بشكل أكثر تعقيداً، لكن الخبراء ما زالوا منقسمين حول ما إذا كان هذا يعني أن الآلة يمكن أن “تشعر” بالفعل، أم أنها مجرد خوارزميات تحاكي العاطفة دون إدراك حقيقي لها.

حين ننظر في عيون شخص يبكي أو نسمع نبرة الفرح في صوت آخر، نحن لا ندرك المشاعر فحسب، بل نشعر بها أيضاً. هذه القدرة على الإحساس والتعاطف لطالما كانت ما يميز الإنسان عن الآلة. لكن اليوم، ومع تطور الذكاء الاصطناعي، بدأت الحدود تتلاشى. روبوتات تتحدث بحنان، أنظمة تواسي مستخدميها، وبرمجيات تتفاعل مع الحزن والفرح وكأنها تمتلك وعياً عاطفياً. فهل يمكن للآلة أن تشعر حقاً، أم أن كل ما تفعله مجرد محاكاة بارعة تخدعنا للحظات؟

“الذكاء الاصطناعي أشبه بدمية متطورة جداً”

قال أستاذ عبدالله الدالي، مطور برمجيات، إن: “الذكاء الاصطناعي مثل الممثل المحترف، لا يشعر بالمشاعر الحقيقية ولكنه يعرف أن يقلدها”. وأضاف أستاذ عبدالله أنه يمكن تصميم أنظمة الذكاء الاصطناعي بحيث تبدو وكأنها تمتلك مشاعر، حيث قال: “المبرمجين يصممون النظام بحيث يحلل الحديث أو الموقف مثل نبرة الصوت، ثم يختار رد مناسب من قاعدة بيانات بها عبارات جاهزة تعبر عن فرح أو زعل أو حتى تعاطف، بمعنى أنه يتم وضع سيناريو ثابت في البرمجة. على سبيل المثال، عندما تقول له ‘أنا حزين’، يرد الرد المبرمج عليه، مثلًا: ‘لماذا أنت حزين؟’”.

من جانبه، قال أستاذ وليد دبور، أستاذ مساعد الذكاء الاصطناعي بجامعة الأهرام الكندية: “الذكاء الاصطناعي الحالي أشبه بدمية متطورة جداً، تتحدث وتتحرك بذكاء لكنها لا تعيش ولا تشعر”. وأكد أستاذ وليد: “لا توجد طريقة لصنع مشاعر حقيقية في الآلات حالياً، وما يحدث هو مجرد تدريب لبيانات وخوارزميات الذكاء الاصطناعي. إذا دربته على نصوص عدوانية قد تصبح ردوده حادة، وإذا دربته على نصوص حزينة، سيقلد اللغة الحزينة، لكن هذا مجرد تمثيل وليس مشاعر حقيقية إطلاقاً”. وشرح أستاذ عبدالله قائلاً: “الإحساس عملية بيولوجية مرتبطة بالمخ والهرمونات عند البشر، بينما الذكاء الاصطناعي ليس إلا مجرد كود وخوارزميات، وهذه محاكاة ذكية جداً”.

“الجهاز العصبي والنفسي مرتبطان ببعضهما وميز الله بهما الكائنات الحية فقط”

قالت دكتورة ماري جرجس، استشارية صحة نفسية: “العناصر التي تشكل المشاعر توجد في الجزء الأوسط من الدماغ وهي منطقة قريبة من اللاوعي، وبالتالي لا يتحكم بها العقل أو المنطق. المشاعر هي كل ما يشعر به الإنسان من فرح وحب وحزن وغضب وغيرها”. وأكدت دكتورة ماري أنه: “لا يمكن لآلة أن تمتلك مشاعر حقيقية، وإلا ستكون مشاعر مزيفة عن طريق التحكم في برمجة تلك الآلة. يمكن للذكاء الاصطناعي أن يفعل أي شيء ويوصل لتقدمات كبيرة جداً، لكن من الصعب أن يتحكم في شيء له علاقة بالسلوكيات والنفسية والجهاز العصبي. فالجهاز العصبي والنفسي مرتبطان ببعضهما وميز الله بهما الكائنات الحية فقط، ومن الصعب أن تمتلكهما آلة. وفي حالة الوصول لتلك التقنيات وتنفيذها بشكل فعلي، ستكون مجرد محاكاة، وسيوضح ذلك في عدم وضوح الحالة الانفعالية بجودتها الطبيعية”.

“المشاعر تحتاج إلى وعي ذاتي”

يرى البعض أن المشاعر تحتاج إلى وعي ذاتي، وهو ما لا يمتلكه الذكاء الاصطناعي حتى الآن، بينما يعتقد آخرون أن المشاعر ليست سوى عمليات إدراكية يمكن برمجتها. بين الرؤيتين، يقف الجدل العلمي والفلسفي.

قالت أستاذة مارتينا سمير، معيدة بقسم الفلسفة في كلية البنات جامعة عين شمس: “المشاعر تعرف فلسفياً بأنها تفاعلات بيولوجية وفكرية للذات الإنسانية، والأنظمة الذكية هي فقط تحاكي العقل البشري، لكن مستحيل أن تصل بالفعل للشعور مثله لأنها لا تمتلك تجربة شعورية واقعية كالبشر. وفي حالة وصولها لذلك، ستكون مجرد محاكاة من خلال الخوارزميات والبيانات المغذية بها من قبل، ولكنها تحتاج لوعي ذاتي، فهي بالنهاية خدع ذكية”.

وأوضحت أستاذة مارتينا قائلة: “بالنسبة لمفهوم الثنائية بين العقل والجسد، تعني الانفصال بين العقل المعنوي والجسد المادي. وهذا المفهوم يعطي إمكانية لامتلاك الذكاء الاصطناعي مشاعر كما البشر، لأن في هذه الحالة لن يحتاج إلى جسم بيولوجي ووعي إنساني حقيقي لكي يشعر. وفي هذه الحالة قد يكون للأنظمة الذكية فرصة لتحمل وعي أو مشاعر من وجهة نظر الفلسفة”.

ورغم التقدم الهائل في الذكاء الاصطناعي، فإن إمكانية امتلاكه مشاعر حقيقية تظل محل جدل واسع. من منظور البرمجة، لا يزال الذكاء الاصطناعي يعتمد على خوارزميات تحاكي المشاعر دون إدراك حقيقي لها. علم النفس يؤكد أن المشاعر ترتبط بتجارب ذاتية وتفاعلات عصبية وهرمونية لا يمكن محاكاتها برمجيًا بشكل كامل. أما الفلسفة، فرغم بعض النظريات التي تفتح المجال أمام إمكانية وعي منفصل عن الجسد، فإنها تتفق مع العلم على أن الوعي والمشاعر كما نعرفها تظل معقدة إلى حد يجعل من الصعب جدًا، إن لم يكن مستحيلًا، أن تمتلكها الآلة. في النهاية، قد يتمكن الذكاء الاصطناعي من خداعنا باستجاباته العاطفية، لكنه سيبقى بلا إحساس حقيقي، مجرد محاكاة متقنة لمشاعر لا يعيشها بالفعل.

 

اظهر المزيد

مقالات ذات صلة

اترك تعليقاً

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *

زر الذهاب إلى الأعلى